Skip to content

update_event_bus async

update_event_bus(
    *,
    config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
    name: Optional[EventBusName] = None,
    kms_key_identifier: Optional[KmsKeyIdentifier] = None,
    description: Optional[EventBusDescription] = None,
    dead_letter_config: Optional[DeadLetterConfig] = None,
    log_config: Optional[LogConfig] = None,
) -> UpdateEventBusResponse

Updates the specified event bus.

Parameters:

  • name (Optional[EventBusName], default: None ) –

    The name of the event bus.

  • 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 CreateDiscoverer on an event bus set to use a customer managed key for encryption.

    • You call UpdatedEventBus to 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.

  • description (Optional[EventBusDescription], default: None ) –

    The event bus description.

  • 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.

Raises:

Source code in docs_src/capo_eventbridge/_services/async_event_bridge.py
async def update_event_bus(
    self,
    *,
    config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
    name: Optional["capo_eventbridge.types.event_bus_name.EventBusName"] = None,
    kms_key_identifier: Optional[
        "capo_eventbridge.types.kms_key_identifier.KmsKeyIdentifier"
    ] = None,
    description: Optional[
        "capo_eventbridge.types.event_bus_description.EventBusDescription"
    ] = None,
    dead_letter_config: Optional[
        "capo_eventbridge.types.dead_letter_config.DeadLetterConfig"
    ] = None,
    log_config: Optional["capo_eventbridge.types.log_config.LogConfig"] = None,
) -> "capo_eventbridge.types.update_event_bus_response.UpdateEventBusResponse":
    """<p>Updates the specified event bus.</p>

    Args:
        name: <p>The name of the event bus.</p>
        kms_key_identifier: <p>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.</p> <p>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.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html">Identify and view keys</a> in the <i>Key Management Service Developer Guide</i>. </p> <note> <p>Schema discovery is not supported for event buses encrypted using a customer managed key. EventBridge returns an error if: </p> <ul> <li> <p>You call <code> <a href="https://docs.aws.amazon.com/eventbridge/latest/schema-reference/v1-discoverers.html#CreateDiscoverer">CreateDiscoverer</a> </code> on an event bus set to use a customer managed key for encryption.</p> </li> <li> <p>You call <code> <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UpdatedEventBus.html">UpdatedEventBus</a> </code> to set a customer managed key on an event bus with schema discovery enabled.</p> </li> </ul> <p>To enable schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption-event-bus-cmkey.html">Encrypting events</a> in the <i>Amazon EventBridge User Guide</i>.</p> </note> <important> <p>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. </p> <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-archives.html">Encrypting archives</a> in the <i>Amazon EventBridge User Guide</i>.</p> </important>
        description: <p>The event bus description.</p>
        log_config: <p>The logging configuration settings for the event bus.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus-logs.html">Configuring logs for event buses</a> in the <i>EventBridge User Guide</i>.</p>

    Raises:
        capo_eventbridge.errors.concurrent_modification_exception.ConcurrentModificationException: <p>There is concurrent modification on a rule, target, archive, or replay.</p>
        capo_eventbridge.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
        capo_eventbridge.errors.operation_disabled_exception.OperationDisabledException: <p>The operation you are attempting is not available in this region.</p>
        capo_eventbridge.errors.resource_not_found_exception.ResourceNotFoundException: <p>An entity that you specified does not exist.</p>
        capo_eventbridge.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_eventbridge.types.update_event_bus_request.UpdateEventBusRequest]",
    ) -> AsyncOperationResponse[
        "capo_eventbridge.types.update_event_bus_response.UpdateEventBusResponse"
    ]:
        import capo_eventbridge._operations.aws_events.update_event_bus

        (
            output,
            http_response,
        ) = await capo_eventbridge._operations.aws_events.update_event_bus.async_update_event_bus(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateEventBus")
    )
    input_: capo_eventbridge.types.update_event_bus_request.UpdateEventBusRequest = {}
    if name is not None:
        input_["name"] = name
    if kms_key_identifier is not None:
        input_["kms_key_identifier"] = kms_key_identifier
    if description is not None:
        input_["description"] = description
    if dead_letter_config is not None:
        input_["dead_letter_config"] = dead_letter_config
    if log_config is not None:
        input_["log_config"] = log_config

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output