Skip to content

iter_list_prefetch_schedules async

iter_list_prefetch_schedules(
    playback_configuration_name: __string,
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
    max_results: Optional[__integerMin1Max100] = None,
    next_token: Optional[__string] = None,
    schedule_type: Optional[ListPrefetchScheduleType] = None,
    stream_id: Optional[__string] = None,
) -> AsyncIterator[PrefetchSchedule]
Source code in docs_src/capo_mediatailor/_services/async_media_tailor.py
async def iter_list_prefetch_schedules(
    self,
    playback_configuration_name: "capo_mediatailor.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
    max_results: Optional[
        "capo_mediatailor.types.__integer_min1_max100.__integerMin1Max100"
    ] = None,
    next_token: Optional["capo_mediatailor.types.__string.__string"] = None,
    schedule_type: Optional[
        "capo_mediatailor.types.list_prefetch_schedule_type.ListPrefetchScheduleType"
    ] = None,
    stream_id: Optional["capo_mediatailor.types.__string.__string"] = None,
) -> "AsyncIterator[capo_mediatailor.types.prefetch_schedule.PrefetchSchedule]":
    _token = next_token
    while True:
        _response = await self.list_prefetch_schedules(
            playback_configuration_name,
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
            schedule_type=schedule_type,
            stream_id=stream_id,
        )
        _page = _resolve_path(_response, ("items",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break