archives
Creates, updates, deletes or gets an archive
resource or lists archives
in a region
Overview
Name | archives |
Type | Resource |
Description | Resource Type definition for AWS::Events::Archive |
Id | aws.events.archives |
Fields
Name | Datatype | Description |
---|---|---|
archive_name | string | |
source_arn | string | |
description | string | |
event_pattern | object | |
arn | string | |
retention_days | integer | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | SourceArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.events.archives (
SourceArn,
region
)
SELECT
'{{ SourceArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.events.archives (
ArchiveName,
SourceArn,
Description,
EventPattern,
RetentionDays,
region
)
SELECT
'{{ ArchiveName }}',
'{{ SourceArn }}',
'{{ Description }}',
'{{ EventPattern }}',
'{{ RetentionDays }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: archive
props:
- name: ArchiveName
value: '{{ ArchiveName }}'
- name: SourceArn
value: '{{ SourceArn }}'
- name: Description
value: '{{ Description }}'
- name: EventPattern
value: {}
- name: RetentionDays
value: '{{ RetentionDays }}'
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