Skip to content

list_vod_sources

list_vod_sources(
    source_location_name: __string,
    *,
    config_overrides: Optional[MediaTailorClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[__string] = None,
) -> ListVodSourcesResponse

Lists the VOD sources contained in a source location. A source represents a piece of content.

Parameters:

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

    The maximum number of VOD sources that you want MediaTailor to return in response to the current request. If there are more than MaxResults VOD sources, 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 ListVodSources 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.

  • source_location_name (__string) –

    The name of the source location associated with this VOD Source list.

Raises:

Source code in docs_src/capo_mediatailor/_services/media_tailor.py
def list_vod_sources(
    self,
    source_location_name: "capo_mediatailor.types.__string.__string",
    *,
    config_overrides: Optional[MediaTailorClientConfig] = None,
    max_results: Optional["capo_mediatailor.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_mediatailor.types.__string.__string"] = None,
) -> "capo_mediatailor.types.list_vod_sources_response.ListVodSourcesResponse":
    """<p>Lists the VOD sources contained in a source location. A source represents a piece of content.</p>

    Args:
        max_results: <p> The maximum number of VOD sources that you want MediaTailor to return in response to the current request. If there are more than <code>MaxResults</code> VOD sources, 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>ListVodSources</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>
        source_location_name: <p>The name of the source location associated with this VOD Source list.</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_vod_sources_request.ListVodSourcesRequest]",
    ) -> OperationResponse[
        "capo_mediatailor.types.list_vod_sources_response.ListVodSourcesResponse"
    ]:
        import capo_mediatailor._operations.media_tailor.list_vod_sources

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListVodSources")
    )
    input_: capo_mediatailor.types.list_vod_sources_request.ListVodSourcesRequest = {
        "source_location_name": source_location_name
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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