ArchiveProps¶
-
class
aws_cdk.aws_events.
ArchiveProps
(*, event_pattern, archive_name=None, description=None, retention=None, source_event_bus)¶ Bases:
aws_cdk.aws_events.BaseArchiveProps
The event archive properties.
- Parameters
event_pattern (
EventPattern
) – 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.aws_events as events import aws_cdk.core as cdk # 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
- Return type
Optional
[str
]
-
description
¶ A description for the archive.
- Default
none
- Return type
Optional
[str
]
-
event_pattern
¶ An event pattern to use to filter events sent to the archive.
- Return type