Skip to content

iter_list_tasks async

iter_list_tasks(
    workspace_name: WorkspaceName,
    *,
    config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[ListTasksRequestMaxResultsInteger] = None,
) -> AsyncIterator[TaskSummary]
Source code in docs_src/capo_iotsitewise/_services/async_io_t_site_wise.py
async def iter_list_tasks(
    self,
    workspace_name: "capo_iotsitewise.types.workspace_name.WorkspaceName",
    *,
    config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
    next_token: Optional[
        "capo_iotsitewise.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[
        "capo_iotsitewise.types.list_tasks_request_max_results_integer.ListTasksRequestMaxResultsInteger"
    ] = None,
) -> "AsyncIterator[capo_iotsitewise.types.task_summary.TaskSummary]":
    _token = next_token
    while True:
        _response = await self.list_tasks(
            workspace_name,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("task_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break