Skip to content

update_event_bus async

update_event_bus(
    event_bus_arn: EventBusArn,
    *,
    config_overrides: Optional[AsyncEventBridgeV2ClientConfig] = None,
    description: Optional[Description] = None,
    encryption_configuration: Optional[EncryptionConfiguration] = None,
    storage_configuration: Optional[StorageConfiguration] = None,
) -> UpdateEventBusResponse

Updates an event bus. The update is asynchronous: the bus moves to UPDATING and returns to ACTIVE when the change is applied. Fields omitted from the request are left unchanged.

Raises:

  • AccessDeniedException –

    The caller does not have the permissions required to perform the operation. This error is also returned when the operation cannot use the AWS KMS key for the event bus.

  • InternalException –

    The request failed because of an internal service error. Retry the request.

  • InvalidInputException –

    A request parameter is missing or not valid.

  • ThrottlingException –

    The request was throttled because it exceeds a request rate limit. Retry the request with backoff.

  • ConcurrentModificationException –

    Another change to the resource is already in progress. Retry the request.

  • InvalidStateException –

    The resource is not in a state that allows the operation. For example, an event bus that is still being created cannot accept events.

  • ResourceNotFoundException –

    The resource does not exist.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_eventbridgev2/_services/async_event_bridge_v2.py
async def update_event_bus(
    self,
    event_bus_arn: "capo_eventbridgev2.types.event_bus_arn.EventBusArn",
    *,
    config_overrides: Optional[AsyncEventBridgeV2ClientConfig] = None,
    description: Optional[
        "capo_eventbridgev2.types.description.Description"
    ] = None,
    encryption_configuration: Optional[
        "capo_eventbridgev2.types.encryption_configuration.EncryptionConfiguration"
    ] = None,
    storage_configuration: Optional[
        "capo_eventbridgev2.types.storage_configuration.StorageConfiguration"
    ] = None,
) -> "capo_eventbridgev2.types.update_event_bus_response.UpdateEventBusResponse":
    """Updates an event bus. The update is asynchronous: the bus moves to UPDATING and returns to ACTIVE when the change is applied. Fields omitted from the request are left unchanged.

    Raises:
        capo_eventbridgev2.errors.access_denied_exception.AccessDeniedException: The caller does not have the permissions required to perform the operation. This error is also returned when the operation cannot use the AWS KMS key for the event bus.
        capo_eventbridgev2.errors.internal_exception.InternalException: The request failed because of an internal service error. Retry the request.
        capo_eventbridgev2.errors.invalid_input_exception.InvalidInputException: A request parameter is missing or not valid.
        capo_eventbridgev2.errors.throttling_exception.ThrottlingException: The request was throttled because it exceeds a request rate limit. Retry the request with backoff.
        capo_eventbridgev2.errors.concurrent_modification_exception.ConcurrentModificationException: Another change to the resource is already in progress. Retry the request.
        capo_eventbridgev2.errors.invalid_state_exception.InvalidStateException: The resource is not in a state that allows the operation. For example, an event bus that is still being created cannot accept events.
        capo_eventbridgev2.errors.resource_not_found_exception.ResourceNotFoundException: The resource does not exist.
        capo_eventbridgev2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_eventbridgev2._operations.aws_events_v2.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_eventbridgev2.types.update_event_bus_request.UpdateEventBusRequest = {
        "event_bus_arn": event_bus_arn
    }
    if description is not None:
        input_["description"] = description
    if encryption_configuration is not None:
        input_["encryption_configuration"] = encryption_configuration
    if storage_configuration is not None:
        input_["storage_configuration"] = storage_configuration

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