Skip to content
v2.278.0

BaseArchiveProps Struct ​

The event archive base properties.

Example ​

ts
const bus = new events.EventBus(this, 'bus', {
  eventBusName: 'MyCustomEventBus',
  description: 'MyCustomEventBus',
});

bus.archive('MyArchive', {
  archiveName: 'MyCustomEventBusArchive',
  description: 'MyCustomerEventBus Archive',
  eventPattern: {
    account: [Stack.of(this).account],
  },
  retention: Duration.days(365),
});
python
bus = events.EventBus(self, "bus",
    event_bus_name="MyCustomEventBus",
    description="MyCustomEventBus"
)

bus.archive("MyArchive",
    archive_name="MyCustomEventBusArchive",
    description="MyCustomerEventBus Archive",
    event_pattern=events.EventPattern(
        account=[Stack.of(self).account]
    ),
    retention=Duration.days(365)
)
java
EventBus bus = EventBus.Builder.create(this, "bus")
        .eventBusName("MyCustomEventBus")
        .description("MyCustomEventBus")
        .build();

bus.archive("MyArchive", BaseArchiveProps.builder()
        .archiveName("MyCustomEventBusArchive")
        .description("MyCustomerEventBus Archive")
        .eventPattern(EventPattern.builder()
                .account(List.of(Stack.of(this).getAccount()))
                .build())
        .retention(Duration.days(365))
        .build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
var bus = new EventBus(this, "bus", new EventBusProps {
    EventBusName = "MyCustomEventBus",
    Description = "MyCustomEventBus"
});

bus.Archive("MyArchive", new BaseArchiveProps {
    ArchiveName = "MyCustomEventBusArchive",
    Description = "MyCustomerEventBus Archive",
    EventPattern = new EventPattern {
        Account = new [] { Stack.Of(this).Account }
    },
    Retention = Duration.Days(365)
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
bus := events.NewEventBus(this, jsii.String("bus"), &EventBusProps{
	EventBusName: jsii.String("MyCustomEventBus"),
	Description: jsii.String("MyCustomEventBus"),
})

bus.archive(jsii.String("MyArchive"), &BaseArchiveProps{
	ArchiveName: jsii.String("MyCustomEventBusArchive"),
	Description: jsii.String("MyCustomerEventBus Archive"),
	EventPattern: &EventPattern{
		Account: []*string{
			awscdk.*stack_Of(this).Account,
		},
	},
	Retention: awscdk.Duration_Days(jsii.Number(365)),
})

Properties ​

archiveNameoptionalstringarchive_nameoptionalstrarchiveNameoptionalStringArchiveNameoptionalstringArchiveNameoptional*string #
The name of the archive.

Default: Automatically generated

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string = none #
A description for the archive.
eventPatternEventPatternevent_patternEventPatterneventPatternEventPatternEventPatternEventPatternEventPatternEventPattern required #
An event pattern to use to filter events sent to the archive.
kmsKeyoptionalIKeykms_keyoptionalIKeykmsKeyoptionalIKeyKmsKeyoptionalIKeyKmsKeyoptionalIKey #
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.