Skip to content

iter_list_fraudsters async

iter_list_fraudsters(
    domain_id: DomainId,
    *,
    config_overrides: Optional[AsyncVoiceIDClientConfig] = None,
    watchlist_id: Optional[WatchlistId] = None,
    max_results: Optional[MaxResultsForList] = None,
    next_token: Optional[NextToken] = None,
) -> AsyncIterator[FraudsterSummary]
Source code in docs_src/capo_voice_id/_services/async_voice_id.py
async def iter_list_fraudsters(
    self,
    domain_id: "capo_voice_id.types.domain_id.DomainId",
    *,
    config_overrides: Optional[AsyncVoiceIDClientConfig] = None,
    watchlist_id: Optional["capo_voice_id.types.watchlist_id.WatchlistId"] = None,
    max_results: Optional[
        "capo_voice_id.types.max_results_for_list.MaxResultsForList"
    ] = None,
    next_token: Optional["capo_voice_id.types.next_token.NextToken"] = None,
) -> "AsyncIterator[capo_voice_id.types.fraudster_summary.FraudsterSummary]":
    _token = next_token
    while True:
        _response = await self.list_fraudsters(
            domain_id,
            config_overrides=config_overrides,
            watchlist_id=watchlist_id,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("fraudster_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break