Skip to content

iter_list_ai_agent_versions async

iter_list_ai_agent_versions(
    assistant_id: UuidOrArn,
    ai_agent_id: UuidOrArnOrEitherWithQualifier,
    *,
    config_overrides: Optional[AsyncQConnectClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    origin: Optional[Origin] = None,
) -> AsyncIterator[AIAgentVersionSummary]
Source code in docs_src/capo_qconnect/_services/async_q_connect.py
async def iter_list_ai_agent_versions(
    self,
    assistant_id: "capo_qconnect.types.uuid_or_arn.UuidOrArn",
    ai_agent_id: "capo_qconnect.types.uuid_or_arn_or_either_with_qualifier.UuidOrArnOrEitherWithQualifier",
    *,
    config_overrides: Optional[AsyncQConnectClientConfig] = None,
    next_token: Optional["capo_qconnect.types.next_token.NextToken"] = None,
    max_results: Optional["capo_qconnect.types.max_results.MaxResults"] = None,
    origin: Optional["capo_qconnect.types.origin.Origin"] = None,
) -> "AsyncIterator[capo_qconnect.types.ai_agent_version_summary.AIAgentVersionSummary]":
    _token = next_token
    while True:
        _response = await self.list_ai_agent_versions(
            assistant_id,
            ai_agent_id,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
            origin=origin,
        )
        _page = _resolve_path(_response, ("ai_agent_version_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break