Skip to content

iter_list_locations async

iter_list_locations(
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    filters: Optional[LocationFilterList] = None,
    limit: Optional[ListLocationsLimit] = None,
    next_token: Optional[NonZeroAndMaxString] = None,
) -> AsyncIterator[LocationModel]
Source code in docs_src/capo_gamelift/_services/async_game_lift.py
async def iter_list_locations(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    filters: Optional[
        "capo_gamelift.types.location_filter_list.LocationFilterList"
    ] = None,
    limit: Optional[
        "capo_gamelift.types.list_locations_limit.ListLocationsLimit"
    ] = None,
    next_token: Optional[
        "capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
    ] = None,
) -> "AsyncIterator[capo_gamelift.types.location_model.LocationModel]":
    _token = next_token
    while True:
        _response = await self.list_locations(
            config_overrides=config_overrides,
            filters=filters,
            limit=limit,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("locations",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break