Skip to content

iter_list_locations async

iter_list_locations(
    *,
    config_overrides: Optional[AsyncDataSyncClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    filters: Optional[LocationFilters] = None,
) -> AsyncIterator[LocationListEntry]
Source code in docs_src/capo_datasync/_services/async_data_sync.py
async def iter_list_locations(
    self,
    *,
    config_overrides: Optional[AsyncDataSyncClientConfig] = None,
    max_results: Optional["capo_datasync.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_datasync.types.next_token.NextToken"] = None,
    filters: Optional[
        "capo_datasync.types.location_filters.LocationFilters"
    ] = None,
) -> "AsyncIterator[capo_datasync.types.location_list_entry.LocationListEntry]":
    _token = next_token
    while True:
        _response = await self.list_locations(
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
            filters=filters,
        )
        _page = _resolve_path(_response, ("locations",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break