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
Idaws.events.archives

Fields

NameDatatypeDescription
archive_namestring
source_arnstring
descriptionstring
event_patternobject
arnstring
retention_daysinteger
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTSourceArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all archives in a region.

SELECT
region,
archive_name,
source_arn,
description,
event_pattern,
arn,
retention_days
FROM aws.events.archives
WHERE region = 'us-east-1';

Gets all properties from an individual archive.

SELECT
region,
archive_name,
source_arn,
description,
event_pattern,
arn,
retention_days
FROM aws.events.archives
WHERE region = 'us-east-1' AND data__Identifier = '<ArchiveName>';

INSERT example

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

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

DELETE example

/*+ delete */
DELETE FROM aws.events.archives
WHERE data__Identifier = '<ArchiveName>'
AND region = 'us-east-1';

Permissions

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

Create

events:DescribeArchive,
events:CreateArchive

Delete

events:DescribeArchive,
events:DeleteArchive

List

events:ListArchives

Update

events:DescribeArchive,
events:UpdateArchive

Read

events:DescribeArchive