create_archive
async
¶
create_archive(
archive_name: ArchiveName,
event_source_arn: Arn,
*,
config_overrides: Optional[AsyncCloudWatchEventsClientConfig] = None,
description: Optional[ArchiveDescription] = None,
event_pattern: Optional[EventPattern] = None,
retention_days: Optional[RetentionDays] = None,
) -> CreateArchiveResponse
Creates an archive of events with the specified settings. When you create an archive, incoming events might not immediately start being sent to the archive. Allow a short period of time for changes to take effect. If you do not specify a pattern to filter events sent to the archive, all events are sent to the archive except replayed events. Replayed events are not sent to an archive.
Parameters:
-
archive_name(ArchiveName) –The name for the archive to create.
-
event_source_arn(Arn) –The ARN of the event bus that sends events to the archive.
-
description(Optional[ArchiveDescription], default:None) –A description for the archive.
-
event_pattern(Optional[EventPattern], default:None) –An event pattern to use to filter events sent to the archive.
-
retention_days(Optional[RetentionDays], default:None) –The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely
Raises:
-
ConcurrentModificationException–There is concurrent modification on a rule, target, archive, or replay.
-
InternalException–This exception occurs due to unexpected causes.
-
InvalidEventPatternException–The event pattern is not valid.
-
LimitExceededException–The request failed because it attempted to create resource beyond the allowed service quota.
-
ResourceAlreadyExistsException–The resource you are trying to create already exists.
-
ResourceNotFoundException–An entity that you specified does not exist.
-
UnknownServiceError–The service returned an error code this client does not model.