ArchiveProps Struct
The event archive properties.
Example
ts
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
archiveNameoptionalstringarchive_nameoptionalstrarchiveNameoptionalStringArchiveNameoptionalstringArchiveNameoptional*string#The name of the archive.
Default: Automatically generated
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string= none#A description for the archive.
eventPatternEventPatternevent_patternEventPatterneventPatternEventPatternEventPatternEventPatternEventPatternEventPatternrequired#An event pattern to use to filter events sent to the archive.
The customer managed key that encrypts this archive.
Default: Use an AWS managed key
retentionoptionalDurationretentionoptionalDurationretentionoptionalDurationRetentionoptionalDurationRetentionoptionalDuration= Infinite#The number of days to retain events for.
Default value is 0. If set to 0, events are retained indefinitely.
sourceEventBusIEventBusRefsource_event_busIEventBusRefsourceEventBusIEventBusRefSourceEventBusIEventBusRefSourceEventBusIEventBusRefrequired#The event source associated with the archive.