Skip to content

iter_list_scheduling_policies async

iter_list_scheduling_policies(
    *,
    config_overrides: Optional[AsyncBatchClientConfig] = None,
    max_results: Optional[Integer] = None,
    next_token: Optional[String] = None,
) -> AsyncIterator[SchedulingPolicyListingDetail]
Source code in docs_src/capo_batch/_services/async_batch.py
async def iter_list_scheduling_policies(
    self,
    *,
    config_overrides: Optional[AsyncBatchClientConfig] = None,
    max_results: Optional["capo_batch.types.integer.Integer"] = None,
    next_token: Optional["capo_batch.types.string.String"] = None,
) -> "AsyncIterator[capo_batch.types.scheduling_policy_listing_detail.SchedulingPolicyListingDetail]":
    _token = next_token
    while True:
        _response = await self.list_scheduling_policies(
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("scheduling_policies",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break