Skip to content

iter_list_environment_hosts async

iter_list_environment_hosts(
    environment_id: EnvironmentId,
    *,
    config_overrides: Optional[AsyncevsClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> AsyncIterator[Host]
Source code in docs_src/capo_evs/_services/async_evs.py
async def iter_list_environment_hosts(
    self,
    environment_id: "capo_evs.types.environment_id.EnvironmentId",
    *,
    config_overrides: Optional[AsyncevsClientConfig] = None,
    next_token: Optional["capo_evs.types.pagination_token.PaginationToken"] = None,
    max_results: Optional["capo_evs.types.max_results.MaxResults"] = None,
) -> "AsyncIterator[capo_evs.types.host.Host]":
    _token = next_token
    while True:
        _response = await self.list_environment_hosts(
            environment_id,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("environment_hosts",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break