ArchiveProps
- class aws_cdk.aws_events.ArchiveProps(*, event_pattern, archive_name=None, description=None, kms_key=None, retention=None, source_event_bus)
Bases:
BaseArchiveProps
The event archive 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 generateddescription (
Optional
[str
]) – A description for the archive. Default: - nonekms_key (
Optional
[IKey
]) – The customer managed key that encrypts this archive. Default: - Use an AWS managed keyretention (
Optional
[Duration
]) – The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely. Default: - Infinitesource_event_bus (
IEventBus
) – The event source associated with the archive.
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_kms as kms from aws_cdk.aws_events import Archive, EventBus # kms_key: kms.IKey stack = Stack() event_bus = EventBus(stack, "Bus") archive = Archive(stack, "Archive", kms_key=kms_key, source_event_bus=event_bus, event_pattern=events.EventPattern( source=["aws.ec2"] ) )
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
- source_event_bus
The event source associated with the archive.