aws-cdk-lib.aws_events.ArchiveProps

interface ArchiveProps

LanguageType name
.NETAmazon.CDK.AWS.Events.ArchiveProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsevents#ArchiveProps
Javasoftware.amazon.awscdk.services.events.ArchiveProps
Pythonaws_cdk.aws_events.ArchiveProps
TypeScript (source)aws-cdk-lib » aws_events » ArchiveProps

The event archive properties.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_events as events } from 'aws-cdk-lib';

declare const detail: any;
declare const eventBus: events.EventBus;
const archiveProps: events.ArchiveProps = {
  eventPattern: {
    account: ['account'],
    detail: {
      detailKey: detail,
    },
    detailType: ['detailType'],
    id: ['id'],
    region: ['region'],
    resources: ['resources'],
    source: ['source'],
    time: ['time'],
    version: ['version'],
  },
  sourceEventBus: eventBus,

  // the properties below are optional
  archiveName: 'archiveName',
  description: 'description',
  retention: cdk.Duration.minutes(30),
};

Properties

NameTypeDescription
eventPatternEventPatternAn event pattern to use to filter events sent to the archive.
sourceEventBusIEventBusThe event source associated with the archive.
archiveName?stringThe name of the archive.
description?stringA description for the archive.
retention?DurationThe number of days to retain events for.

eventPattern

Type: EventPattern

An event pattern to use to filter events sent to the archive.


sourceEventBus

Type: IEventBus

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.


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.