BaseArchiveProps

class aws_cdk.aws_events.BaseArchiveProps(*, event_pattern, archive_name=None, description=None, kms_key=None, retention=None)

Bases: object

The event archive base properties.

Parameters:
  • event_pattern (Union[EventPattern, Dict[str, Any]]) – An event pattern to use to filter events sent to the archive.

  • archive_name (Optional[str]) – The name of the archive. Default: - Automatically generated

  • description (Optional[str]) – A description for the archive. Default: - none

  • kms_key (Optional[IKey]) – The customer managed key that encrypts this archive. Default: - Use an AWS managed key

  • retention (Optional[Duration]) – The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely. Default: - Infinite

ExampleMetadata:

infused

Example:

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)
)

Attributes

archive_name

The name of the archive.

Default:
  • Automatically generated

description

A description for the archive.

Default:
  • none

event_pattern

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

kms_key

The customer managed key that encrypts this archive.

Default:
  • Use an AWS managed key

retention

The number of days to retain events for.

Default value is 0. If set to 0, events are retained indefinitely.

Default:
  • Infinite