create_event_bus
async
¶
create_event_bus(
name: EventBusName,
*,
config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
event_source_name: Optional[EventSourceName] = None,
description: Optional[EventBusDescription] = None,
kms_key_identifier: Optional[KmsKeyIdentifier] = None,
dead_letter_config: Optional[DeadLetterConfig] = None,
log_config: Optional[LogConfig] = None,
tags: Optional[TagList] = None,
) -> CreateEventBusResponse
Creates a new event bus within your account. This can be a custom event bus which you can use to receive events from your custom applications and services, or it can be a partner event bus which can be matched to a partner event source.
Parameters:
-
name(EventBusName) –The name of the new event bus.
Custom event bus names can't contain the
/character, but you can use the/character in partner event bus names. In addition, for partner event buses, the name must exactly match the name of the partner event source that this event bus is matched to.You can't use the name
defaultfor a custom event bus, as this name is already used for your account's default event bus. -
event_source_name(Optional[EventSourceName], default:None) –If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.
-
description(Optional[EventBusDescription], default:None) –The event bus description.
-
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 events on this event bus. 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 events on the event bus.
For more information, see Identify and view keys in the Key Management Service Developer Guide.
Schema discovery is not supported for event buses encrypted using a customer managed key. EventBridge returns an error if:
-
You call
CreateDiscovereron an event bus set to use a customer managed key for encryption. -
You call
UpdatedEventBusto set a customer managed key on an event bus with schema discovery enabled.
To enable schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see Encrypting events in the Amazon EventBridge User 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.
-
-
log_config(Optional[LogConfig], default:None) –The logging configuration settings for the event bus.
For more information, see Configuring logs for event buses in the EventBridge User Guide.
-
tags(Optional[TagList], default:None) –Tags to associate with the event bus.
Raises:
-
ConcurrentModificationException–There is concurrent modification on a rule, target, archive, or replay.
-
InternalException–This exception occurs due to unexpected causes.
-
InvalidStateException–The specified state is not a valid state for an event source.
-
LimitExceededException–The request failed because it attempted to create resource beyond the allowed service quota.
-
OperationDisabledException–The operation you are attempting is not available in this region.
-
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
717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 | |