Skip to content

iter_describe_service_environments

iter_describe_service_environments(
    *,
    config_overrides: Optional[BatchClientConfig] = None,
    service_environments: Optional[StringList] = None,
    max_results: Optional[Integer] = None,
    next_token: Optional[String] = None,
) -> Iterator[ServiceEnvironmentDetail]
Source code in docs_src/capo_batch/_services/batch.py
def iter_describe_service_environments(
    self,
    *,
    config_overrides: Optional[BatchClientConfig] = None,
    service_environments: Optional[
        "capo_batch.types.string_list.StringList"
    ] = None,
    max_results: Optional["capo_batch.types.integer.Integer"] = None,
    next_token: Optional["capo_batch.types.string.String"] = None,
) -> (
    "Iterator[capo_batch.types.service_environment_detail.ServiceEnvironmentDetail]"
):
    _token = next_token
    while True:
        _response = self.describe_service_environments(
            config_overrides=config_overrides,
            service_environments=service_environments,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("service_environments",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break