create_archive
async
¶
create_archive(
archive_name: ArchiveName,
event_source_arn: EventBusArn,
*,
config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
description: Optional[ArchiveDescription] = None,
event_pattern: Optional[EventPattern] = None,
retention_days: Optional[RetentionDays] = None,
kms_key_identifier: Optional[KmsKeyIdentifier] = 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.
If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well.
For more information, see Encrypting archives in the Amazon EventBridge User Guide.
Parameters:
-
archive_name(ArchiveName) –The name for the archive to create.
-
event_source_arn(EventBusArn) –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
-
kms_key_identifier(Optional[KmsKeyIdentifier], default:None) –The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this archive. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.
If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the archive.
For more information, see Identify and view keys in the Key Management Service Developer Guide.
If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well.
For more information, see Encrypting archives in the Amazon EventBridge User Guide.
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.
Source code in docs_src/capo_eventbridge/_services/async_event_bridge.py
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 | |