Lists all the event buses in your account, including the default event bus, custom event buses, and partner event buses.
Parameters:
-
name_prefix
(Optional[EventBusName], default:
None
)
–
Specifying this limits the results to only those event buses with names that start with the specified prefix.
-
next_token
(Optional[NextToken], default:
None
)
–
The token returned by a previous call to retrieve the next set of results.
-
limit
(Optional[LimitMax100], default:
None
)
–
Specifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.
Raises:
Source code in docs_src/capo_cloudwatch_events/_services/cloud_watch_events.py
| def list_event_buses(
self,
*,
config_overrides: Optional[CloudWatchEventsClientConfig] = None,
name_prefix: Optional[
"capo_cloudwatch_events.types.event_bus_name.EventBusName"
] = None,
next_token: Optional[
"capo_cloudwatch_events.types.next_token.NextToken"
] = None,
limit: Optional["capo_cloudwatch_events.types.limit_max100.LimitMax100"] = None,
) -> (
"capo_cloudwatch_events.types.list_event_buses_response.ListEventBusesResponse"
):
"""<p>Lists all the event buses in your account, including the default event bus, custom event buses, and partner event buses.</p>
Args:
name_prefix: <p>Specifying this limits the results to only those event buses with names that start with the specified prefix.</p>
next_token: <p>The token returned by a previous call to retrieve the next set of results.</p>
limit: <p>Specifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.</p>
Raises:
capo_cloudwatch_events.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
capo_cloudwatch_events.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudwatch_events.types.list_event_buses_request.ListEventBusesRequest]",
) -> OperationResponse[
"capo_cloudwatch_events.types.list_event_buses_response.ListEventBusesResponse"
]:
import capo_cloudwatch_events._operations.aws_events.list_event_buses
output, http_response = (
capo_cloudwatch_events._operations.aws_events.list_event_buses.list_event_buses(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListEventBuses")
)
input_: capo_cloudwatch_events.types.list_event_buses_request.ListEventBusesRequest = {}
if name_prefix is not None:
input_["name_prefix"] = name_prefix
if next_token is not None:
input_["next_token"] = next_token
if limit is not None:
input_["limit"] = limit
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|