interface ArchiveProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Events.ArchiveProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsevents#ArchiveProps |
![]() | software.amazon.awscdk.services.events.ArchiveProps |
![]() | aws_cdk.aws_events.ArchiveProps |
![]() | aws-cdk-lib » aws_events » ArchiveProps |
The event archive properties.
Example
import * as kms from 'aws-cdk-lib/aws-kms';
import { Archive, EventBus } from 'aws-cdk-lib/aws-events';
const stack = new Stack();
declare const kmsKey: kms.IKey;
const eventBus = new EventBus(stack, 'Bus');
const archive = new Archive(stack, 'Archive', {
kmsKey: kmsKey,
sourceEventBus: eventBus,
eventPattern: {
source: ['aws.ec2']
},
});
Properties
Name | Type | Description |
---|---|---|
event | Event | An event pattern to use to filter events sent to the archive. |
source | IEvent | The event source associated with the archive. |
archive | string | The name of the archive. |
description? | string | A description for the archive. |
kms | IKey | The customer managed key that encrypts this archive. |
retention? | Duration | The number of days to retain events for. |
eventPattern
Type:
Event
An event pattern to use to filter events sent to the archive.
sourceEventBus
Type:
IEvent
The event source associated with the archive.
archiveName?
Type:
string
(optional, default: Automatically generated)
The name of the archive.
description?
Type:
string
(optional, default: none)
A description for the archive.
kmsKey?
Type:
IKey
(optional, default: Use an AWS managed key)
The customer managed key that encrypts this archive.
retention?
Type:
Duration
(optional, default: Infinite)
The number of days to retain events for.
Default value is 0. If set to 0, events are retained indefinitely.