Skip to content

iter_describe_destinations async

iter_describe_destinations(
    *,
    config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
    destination_name_prefix: Optional[DestinationName] = None,
    next_token: Optional[NextToken] = None,
    limit: Optional[DescribeLimit] = None,
) -> AsyncIterator[Destination]
Source code in docs_src/capo_cloudwatch_logs/_services/async_cloud_watch_logs.py
async def iter_describe_destinations(
    self,
    *,
    config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
    destination_name_prefix: Optional[
        "capo_cloudwatch_logs.types.destination_name.DestinationName"
    ] = None,
    next_token: Optional["capo_cloudwatch_logs.types.next_token.NextToken"] = None,
    limit: Optional[
        "capo_cloudwatch_logs.types.describe_limit.DescribeLimit"
    ] = None,
) -> "AsyncIterator[capo_cloudwatch_logs.types.destination.Destination]":
    _token = next_token
    while True:
        _response = await self.describe_destinations(
            config_overrides=config_overrides,
            destination_name_prefix=destination_name_prefix,
            next_token=_token,
            limit=limit,
        )
        _page = _resolve_path(_response, ("destinations",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break