Skip to content

iter_list_agentic_contexts async

iter_list_agentic_contexts(
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    context_type: Optional[AgenticContextType] = None,
    max_results: Optional[Limit100] = None,
    next_token: Optional[PaginationToken] = None,
) -> AsyncIterator[AgenticContextSummary]
Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def iter_list_agentic_contexts(
    self,
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    context_type: Optional[
        "capo_workspaces.types.agentic_context_type.AgenticContextType"
    ] = None,
    max_results: Optional["capo_workspaces.types.limit100.Limit100"] = None,
    next_token: Optional[
        "capo_workspaces.types.pagination_token.PaginationToken"
    ] = None,
) -> "AsyncIterator[capo_workspaces.types.agentic_context_summary.AgenticContextSummary]":
    _token = next_token
    while True:
        _response = await self.list_agentic_contexts(
            config_overrides=config_overrides,
            context_type=context_type,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("agentic_context_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break