Skip to main content

assertions

Creates, updates, deletes, gets or lists an assertions resource.

Overview

Nameassertions
TypeResource
Idaws.resiliencehubv2.assertions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
assertion_idstringThe 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_atstring (date-time)The timestamp when the assertion was created.
service_arnstringARN 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>)
sourcestringThe source of the assertion, indicating whether it was AI-generated or created by a user. (AI_GENERATED, USER)
textstringThe text content of the assertion.
updated_atstring (date-time)The timestamp when the assertion was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_assertionsselectserviceArn, regionsource, maxResults, nextTokenLists resilience assertions for a service.
create_assertioninsertregion, serviceArn, textCreates a resilience assertion for a service.
update_assertionupdateregion, serviceArn, assertionIdUpdates a resilience assertion.
delete_assertiondeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
serviceArnstring
maxResultsinteger
nextTokenstring
sourcestringFilter assertions by source type.

SELECT examples

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

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
;

UPDATE examples

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

Deletes a resilience assertion from a service.

DELETE FROM aws.resiliencehubv2.assertions
WHERE region = '{{ region }}' --required
;