Skip to content

iter_list_default_vocabularies async

iter_list_default_vocabularies(
    instance_id: InstanceId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    language_code: Optional[VocabularyLanguageCode] = None,
    max_results: Optional[MaxResult100] = None,
    next_token: Optional[VocabularyNextToken] = None,
) -> AsyncIterator[DefaultVocabulary]
Source code in docs_src/capo_connect/_services/async_connect.py
async def iter_list_default_vocabularies(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    language_code: Optional[
        "capo_connect.types.vocabulary_language_code.VocabularyLanguageCode"
    ] = None,
    max_results: Optional["capo_connect.types.max_result100.MaxResult100"] = None,
    next_token: Optional[
        "capo_connect.types.vocabulary_next_token.VocabularyNextToken"
    ] = None,
) -> "AsyncIterator[capo_connect.types.default_vocabulary.DefaultVocabulary]":
    _token = next_token
    while True:
        _response = await self.list_default_vocabularies(
            instance_id,
            config_overrides=config_overrides,
            language_code=language_code,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("default_vocabulary_list",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break