Skip to content

list_prefetch_schedules

list_prefetch_schedules(
    playback_configuration_name: __string,
    *,
    config_overrides: Optional[MediaTailorClientConfig] = None,
    max_results: Optional[__integerMin1Max100] = None,
    next_token: Optional[__string] = None,
    schedule_type: Optional[ListPrefetchScheduleType] = None,
    stream_id: Optional[__string] = None,
) -> ListPrefetchSchedulesResponse

Lists the prefetch schedules for a playback configuration.

Parameters:

  • max_results (Optional[__integerMin1Max100], default: None ) –

    The maximum number of prefetch schedules that you want MediaTailor to return in response to the current request. If there are more than MaxResults prefetch schedules, use the value of NextToken in the response to get the next page of results.

    The default value is 100. MediaTailor uses DynamoDB-based pagination, which means that a response might contain fewer than MaxResults items, including 0 items, even when more results are available. To retrieve all results, you must continue making requests using the NextToken value from each response until the response no longer includes a NextToken value.

  • next_token (Optional[__string], default: None ) –

    Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.

    For the first ListPrefetchSchedules request, omit this value. For subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request. Continue making requests until the response no longer includes a NextToken value, which indicates that all results have been retrieved.

  • playback_configuration_name (__string) –

    Retrieves the prefetch schedule(s) for a specific playback configuration.

  • schedule_type (Optional[ListPrefetchScheduleType], default: None ) –

    The type of prefetch schedules that you want to list. SINGLE indicates that you want to list the configured single prefetch schedules. RECURRING indicates that you want to list the configured recurring prefetch schedules. ALL indicates that you want to list all configured prefetch schedules.

  • stream_id (Optional[__string], default: None ) –

    An optional filtering parameter whereby MediaTailor filters the prefetch schedules to include only specific streams.

Raises:

Source code in docs_src/capo_mediatailor/_services/media_tailor.py
def list_prefetch_schedules(
    self,
    playback_configuration_name: "capo_mediatailor.types.__string.__string",
    *,
    config_overrides: Optional[MediaTailorClientConfig] = 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,
) -> "capo_mediatailor.types.list_prefetch_schedules_response.ListPrefetchSchedulesResponse":
    """<p>Lists the prefetch schedules for a playback configuration.</p>

    Args:
        max_results: <p>The maximum number of prefetch schedules that you want MediaTailor to return in response to the current request. If there are more than <code>MaxResults</code> prefetch schedules, use the value of <code>NextToken</code> in the response to get the next page of results.</p> <p>The default value is 100. MediaTailor uses DynamoDB-based pagination, which means that a response might contain fewer than <code>MaxResults</code> items, including 0 items, even when more results are available. To retrieve all results, you must continue making requests using the <code>NextToken</code> value from each response until the response no longer includes a <code>NextToken</code> value.</p>
        next_token: <p>Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.</p> <p>For the first <code>ListPrefetchSchedules</code> request, omit this value. For subsequent requests, get the value of <code>NextToken</code> from the previous response and specify that value for <code>NextToken</code> in the request. Continue making requests until the response no longer includes a <code>NextToken</code> value, which indicates that all results have been retrieved.</p>
        playback_configuration_name: <p>Retrieves the prefetch schedule(s) for a specific playback configuration.</p>
        schedule_type: <p>The type of prefetch schedules that you want to list. <code>SINGLE</code> indicates that you want to list the configured single prefetch schedules. <code>RECURRING</code> indicates that you want to list the configured recurring prefetch schedules. <code>ALL</code> indicates that you want to list all configured prefetch schedules.</p>
        stream_id: <p>An optional filtering parameter whereby MediaTailor filters the prefetch schedules to include only specific streams.</p>

    Raises:
        capo_mediatailor.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_mediatailor.types.list_prefetch_schedules_request.ListPrefetchSchedulesRequest]",
    ) -> OperationResponse[
        "capo_mediatailor.types.list_prefetch_schedules_response.ListPrefetchSchedulesResponse"
    ]:
        import capo_mediatailor._operations.media_tailor.list_prefetch_schedules

        output, http_response = (
            capo_mediatailor._operations.media_tailor.list_prefetch_schedules.list_prefetch_schedules(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPrefetchSchedules")
    )
    input_: capo_mediatailor.types.list_prefetch_schedules_request.ListPrefetchSchedulesRequest = {
        "playback_configuration_name": playback_configuration_name
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if schedule_type is not None:
        input_["schedule_type"] = schedule_type
    if stream_id is not None:
        input_["stream_id"] = stream_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output