async def iter_list_discovered_endpoints(
self,
pentest_job_id: str,
agent_space_id: str,
*,
config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
max_results: Optional["capo_securityagent.types.max_results.MaxResults"] = None,
prefix: Optional[str] = None,
next_token: Optional["capo_securityagent.types.next_token.NextToken"] = None,
) -> (
"AsyncIterator[capo_securityagent.types.discovered_endpoint.DiscoveredEndpoint]"
):
_token = next_token
while True:
_response = await self.list_discovered_endpoints(
pentest_job_id,
agent_space_id,
config_overrides=config_overrides,
max_results=max_results,
prefix=prefix,
next_token=_token,
)
_page = _resolve_path(_response, ("discovered_endpoints",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break