Skip to content

iter_list_workloads async

iter_list_workloads(
    *,
    config_overrides: Optional[AsyncLaunchWizardClientConfig] = None,
    max_results: Optional[MaxWorkloadResults] = None,
    next_token: Optional[NextToken] = None,
) -> AsyncIterator[WorkloadDataSummary]
Source code in docs_src/capo_launch_wizard/_services/async_launch_wizard.py
async def iter_list_workloads(
    self,
    *,
    config_overrides: Optional[AsyncLaunchWizardClientConfig] = None,
    max_results: Optional[
        "capo_launch_wizard.types.max_workload_results.MaxWorkloadResults"
    ] = None,
    next_token: Optional["capo_launch_wizard.types.next_token.NextToken"] = None,
) -> "AsyncIterator[capo_launch_wizard.types.workload_data_summary.WorkloadDataSummary]":
    _token = next_token
    while True:
        _response = await self.list_workloads(
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("workloads",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break