Skip to content

iter_list_artifacts async

iter_list_artifacts(
    agent_space_id: AgentSpaceId,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> AsyncIterator[ArtifactSummary]
Source code in docs_src/capo_securityagent/_services/async_security_agent.py
async def iter_list_artifacts(
    self,
    agent_space_id: "capo_securityagent.types.agent_space_id.AgentSpaceId",
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
    next_token: Optional["capo_securityagent.types.next_token.NextToken"] = None,
    max_results: Optional["capo_securityagent.types.max_results.MaxResults"] = None,
) -> "AsyncIterator[capo_securityagent.types.artifact_summary.ArtifactSummary]":
    _token = next_token
    while True:
        _response = await self.list_artifacts(
            agent_space_id,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("artifact_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break