Deletes the specified custom event bus or partner event bus. All rules associated with this event bus need to be deleted. You can't delete your account's default event bus.
Parameters:
Raises:
Source code in docs_src/capo_eventbridge/_services/async_event_bridge.py
| async def delete_event_bus(
self,
name: "capo_eventbridge.types.event_bus_name.EventBusName",
*,
config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
) -> None:
"""<p>Deletes the specified custom event bus or partner event bus. All rules associated with this event bus need to be deleted. You can't delete your account's default event bus.</p>
Args:
name: <p>The name of the event bus to delete.</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.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_eventbridge.types.delete_event_bus_request.DeleteEventBusRequest]",
) -> AsyncOperationResponse[None]:
import capo_eventbridge._operations.aws_events.delete_event_bus
(
output,
http_response,
) = await capo_eventbridge._operations.aws_events.delete_event_bus.async_delete_event_bus(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteEventBus")
)
input_: capo_eventbridge.types.delete_event_bus_request.DeleteEventBusRequest = {
"name": name
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|