assertions
Creates, updates, deletes, gets or lists an assertions resource.
Overview
| Name | assertions |
| Type | Resource |
| Id | aws.resiliencehubv2.assertions |
Fields
The following fields are returned by SELECT queries:
- list_assertions
| Name | Datatype | Description |
|---|---|---|
assertion_id | string | The unique identifier of the assertion. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}</code>) |
created_at | string (date-time) | The timestamp when the assertion was created. |
service_arn | string | ARN identifier. (pattern: <code>arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+.-]{0,1023}</code>) |
source | string | The source of the assertion, indicating whether it was AI-generated or created by a user. (AI_GENERATED, USER) |
text | string | The text content of the assertion. |
updated_at | string (date-time) | The timestamp when the assertion was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_assertions | select | serviceArn, region | source, maxResults, nextToken | Lists resilience assertions for a service. |
create_assertion | insert | region, serviceArn, text | Creates a resilience assertion for a service. | |
update_assertion | update | region, serviceArn, assertionId | Updates a resilience assertion. | |
delete_assertion | delete | region | Deletes a resilience assertion from a service. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
serviceArn | string | |
maxResults | integer | |
nextToken | string | |
source | string | Filter assertions by source type. |
SELECT examples
- list_assertions
Lists resilience assertions for a service.
SELECT
assertion_id,
created_at,
service_arn,
source,
text,
updated_at
FROM aws.resiliencehubv2.assertions
WHERE serviceArn = '{{ serviceArn }}' -- required
AND region = '{{ region }}' -- required
AND source = '{{ source }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_assertion
- Manifest
Creates a resilience assertion for a service.
INSERT INTO aws.resiliencehubv2.assertions (
serviceArn,
text,
clientToken,
region
)
SELECT
'{{ serviceArn }}' /* required */,
'{{ text }}' /* required */,
'{{ clientToken }}',
'{{ region }}'
RETURNING
assertion
;
# Description fields are for documentation purposes
- name: assertions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the assertions resource.
- name: serviceArn
value: "{{ serviceArn }}"
description: |
ARN identifier.
- name: text
value: "{{ text }}"
- name: clientToken
value: "{{ clientToken }}"
description: |
Idempotency token.
UPDATE examples
- update_assertion
Updates a resilience assertion.
UPDATE aws.resiliencehubv2.assertions
SET
serviceArn = '{{ serviceArn }}',
assertionId = '{{ assertionId }}',
text = '{{ text }}'
WHERE
region = '{{ region }}' --required
AND serviceArn = '{{ serviceArn }}' --required
AND assertionId = '{{ assertionId }}' --required
RETURNING
assertion;
DELETE examples
- delete_assertion
Deletes a resilience assertion from a service.
DELETE FROM aws.resiliencehubv2.assertions
WHERE region = '{{ region }}' --required
;