Skip to content

iter_list_channels async

iter_list_channels(
    notification_configuration_arn: NotificationConfigurationArn,
    *,
    config_overrides: Optional[AsyncNotificationsClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[NextToken] = None,
) -> AsyncIterator[ChannelArn]
Source code in docs_src/capo_notifications/_services/async_notifications.py
async def iter_list_channels(
    self,
    notification_configuration_arn: "capo_notifications.types.notification_configuration_arn.NotificationConfigurationArn",
    *,
    config_overrides: Optional[AsyncNotificationsClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_notifications.types.next_token.NextToken"] = None,
) -> "AsyncIterator[capo_notifications.types.channel_arn.ChannelArn]":
    _token = next_token
    while True:
        _response = await self.list_channels(
            notification_configuration_arn,
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("channels",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break