Skip to content

iter_list_presets async

iter_list_presets(
    *,
    config_overrides: Optional[AsyncElasticTranscoderClientConfig] = None,
    ascending: Optional[Ascending] = None,
    page_token: Optional[Id] = None,
) -> AsyncIterator[Preset]
Source code in docs_src/capo_elastic_transcoder/_services/async_elastic_transcoder.py
async def iter_list_presets(
    self,
    *,
    config_overrides: Optional[AsyncElasticTranscoderClientConfig] = None,
    ascending: Optional["capo_elastic_transcoder.types.ascending.Ascending"] = None,
    page_token: Optional["capo_elastic_transcoder.types.id.Id"] = None,
) -> "AsyncIterator[capo_elastic_transcoder.types.preset.Preset]":
    _token = page_token
    while True:
        _response = await self.list_presets(
            config_overrides=config_overrides,
            ascending=ascending,
            page_token=_token,
        )
        _page = _resolve_path(_response, ("presets",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_page_token",))
        if not _token:
            break