Skip to main content

archives

Creates, updates, deletes or gets an archive resource or lists archives in a region

Overview

Namearchives
TypeResource
DescriptionResource Type definition for AWS::Events::Archive
Idawscc.events.archives

Fields

NameDatatypeDescription
archive_namestring
source_arnstring
descriptionstring
event_patternobject
arnstring
retention_daysinteger
kms_key_identifierstring
regionstringAWS region.

For more information, see AWS::Events::Archive.

Methods

NameResourceAccessible byRequired Params
create_resourcearchivesINSERTSourceArn, region
delete_resourcearchivesDELETEIdentifier, region
update_resourcearchivesUPDATEIdentifier, PatchDocument, region
list_resourcesarchives_list_onlySELECTregion
get_resourcearchivesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual archive.

SELECT
region,
archive_name,
source_arn,
description,
event_pattern,
arn,
retention_days,
kms_key_identifier
FROM awscc.events.archives
WHERE
region = 'us-east-1' AND
Identifier = '{{ archive_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new archive resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.events.archives (
SourceArn,
region
)
SELECT
'{{ source_arn }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a archive resource, using stack-deploy.

/*+ update */
UPDATE awscc.events.archives
SET PatchDocument = string('{{ {
"Description": description,
"EventPattern": event_pattern,
"RetentionDays": retention_days,
"KmsKeyIdentifier": kms_key_identifier
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ archive_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.events.archives
WHERE
Identifier = '{{ archive_name }}' AND
region = 'us-east-1';

Permissions

To operate on the archives resource, the following permissions are required:

events:DescribeArchive,
events:CreateArchive,
kms:DescribeKey,
kms:GenerateDataKey,
kms:Decrypt