ArchiveProps
- class aws_cdk.aws_events.ArchiveProps(*, event_pattern, archive_name=None, description=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: - noneretention (
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:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk from aws_cdk import aws_events as events # detail: Any # event_bus: events.EventBus archive_props = events.ArchiveProps( event_pattern=events.EventPattern( account=["account"], detail={ "detail_key": detail }, detail_type=["detailType"], id=["id"], region=["region"], resources=["resources"], source=["source"], time=["time"], version=["version"] ), source_event_bus=event_bus, # the properties below are optional archive_name="archiveName", description="description", retention=cdk.Duration.minutes(30) )
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.
- 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.