Skip to content

iter_list_invocations async

iter_list_invocations(
    session_identifier: SessionIdentifier,
    *,
    config_overrides: Optional[AsyncBedrockAgentRuntimeClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> AsyncIterator[InvocationSummary]
Source code in docs_src/capo_bedrock_agent_runtime/_services/async_bedrock_agent_runtime.py
async def iter_list_invocations(
    self,
    session_identifier: "capo_bedrock_agent_runtime.types.session_identifier.SessionIdentifier",
    *,
    config_overrides: Optional[AsyncBedrockAgentRuntimeClientConfig] = None,
    next_token: Optional[
        "capo_bedrock_agent_runtime.types.next_token.NextToken"
    ] = None,
    max_results: Optional[
        "capo_bedrock_agent_runtime.types.max_results.MaxResults"
    ] = None,
) -> "AsyncIterator[capo_bedrock_agent_runtime.types.invocation_summary.InvocationSummary]":
    _token = next_token
    while True:
        _response = await self.list_invocations(
            session_identifier,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("invocation_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break