Skip to content

iter_list_event_buses async

iter_list_event_buses(
    *,
    config_overrides: Optional[AsyncEventBridgeV2ClientConfig] = None,
    name_prefix: Optional[EventBusName] = None,
    event_bus_account_id: Optional[AccountId] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> AsyncIterator[EventBusSummary]
Source code in docs_src/capo_eventbridgev2/_services/async_event_bridge_v2.py
async def iter_list_event_buses(
    self,
    *,
    config_overrides: Optional[AsyncEventBridgeV2ClientConfig] = None,
    name_prefix: Optional[
        "capo_eventbridgev2.types.event_bus_name.EventBusName"
    ] = None,
    event_bus_account_id: Optional[
        "capo_eventbridgev2.types.account_id.AccountId"
    ] = None,
    next_token: Optional["capo_eventbridgev2.types.next_token.NextToken"] = None,
    max_results: Optional["capo_eventbridgev2.types.max_results.MaxResults"] = None,
) -> "AsyncIterator[capo_eventbridgev2.types.event_bus_summary.EventBusSummary]":
    _token = next_token
    while True:
        _response = await self.list_event_buses(
            config_overrides=config_overrides,
            name_prefix=name_prefix,
            event_bus_account_id=event_bus_account_id,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("event_buses",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break