Skip to content

iter_list_environments

iter_list_environments(
    *,
    config_overrides: Optional[evsClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
    state: Optional[EnvironmentStateList] = None,
) -> Iterator[EnvironmentSummary]
Source code in docs_src/capo_evs/_services/evs.py
def iter_list_environments(
    self,
    *,
    config_overrides: Optional[evsClientConfig] = None,
    next_token: Optional["capo_evs.types.pagination_token.PaginationToken"] = None,
    max_results: Optional["capo_evs.types.max_results.MaxResults"] = None,
    state: Optional[
        "capo_evs.types.environment_state_list.EnvironmentStateList"
    ] = None,
) -> "Iterator[capo_evs.types.environment_summary.EnvironmentSummary]":
    _token = next_token
    while True:
        _response = self.list_environments(
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
            state=state,
        )
        _page = _resolve_path(_response, ("environment_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break