UNPKG

1.44 kBTypeScriptView Raw
1import { Duration, Resource } from '@aws-cdk/core';
2import { Construct } from 'constructs';
3import { IEventBus } from './event-bus';
4import { EventPattern } from './event-pattern';
5/**
6 * The event archive base properties
7 */
8export interface BaseArchiveProps {
9 /**
10 * The name of the archive.
11 *
12 * @default - Automatically generated
13 */
14 readonly archiveName?: string;
15 /**
16 * A description for the archive.
17 *
18 * @default - none
19 */
20 readonly description?: string;
21 /**
22 * An event pattern to use to filter events sent to the archive.
23 */
24 readonly eventPattern: EventPattern;
25 /**
26 * The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely.
27 * @default - Infinite
28 */
29 readonly retention?: Duration;
30}
31/**
32 * The event archive properties
33 */
34export interface ArchiveProps extends BaseArchiveProps {
35 /**
36 * The event source associated with the archive.
37 */
38 readonly sourceEventBus: IEventBus;
39}
40/**
41 * Define an EventBridge Archive
42 *
43 * @resource AWS::Events::Archive
44 */
45export declare class Archive extends Resource {
46 /**
47 * The archive name.
48 * @attribute
49 */
50 readonly archiveName: string;
51 /**
52 * The ARN of the archive created.
53 * @attribute
54 */
55 readonly archiveArn: string;
56 constructor(scope: Construct, id: string, props: ArchiveProps);
57}