Skip to content

iter_list_batch_job_definitions

iter_list_batch_job_definitions(
    application_id: Identifier,
    *,
    config_overrides: Optional[m2ClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    prefix: Optional[str] = None,
) -> Iterator[BatchJobDefinition]
Source code in docs_src/capo_m2/_services/m2.py
def iter_list_batch_job_definitions(
    self,
    application_id: "capo_m2.types.identifier.Identifier",
    *,
    config_overrides: Optional[m2ClientConfig] = None,
    next_token: Optional["capo_m2.types.next_token.NextToken"] = None,
    max_results: Optional["capo_m2.types.max_results.MaxResults"] = None,
    prefix: Optional[str] = None,
) -> "Iterator[capo_m2.types.batch_job_definition.BatchJobDefinition]":
    _token = next_token
    while True:
        _response = self.list_batch_job_definitions(
            application_id,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
            prefix=prefix,
        )
        _page = _resolve_path(_response, ("batch_job_definitions",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break