Skip to content

list_origin_endpoints

list_origin_endpoints(
    *,
    config_overrides: Optional[MediaPackageClientConfig] = None,
    channel_id: Optional[__string] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[__string] = None,
) -> ListOriginEndpointsResponse

Returns a collection of OriginEndpoint records.

Parameters:

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

    When specified, the request will return only OriginEndpoints associated with the given Channel ID.

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

    The upper bound on the number of records to return.

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

    A token used to resume pagination from the end of a previous request.

Raises:

Source code in docs_src/capo_mediapackage/_services/media_package.py
def list_origin_endpoints(
    self,
    *,
    config_overrides: Optional[MediaPackageClientConfig] = None,
    channel_id: Optional["capo_mediapackage.types.__string.__string"] = None,
    max_results: Optional["capo_mediapackage.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_mediapackage.types.__string.__string"] = None,
) -> "capo_mediapackage.types.list_origin_endpoints_response.ListOriginEndpointsResponse":
    """Returns a collection of OriginEndpoint records.

    Args:
        channel_id: When specified, the request will return only OriginEndpoints associated with the given Channel ID.
        max_results: The upper bound on the number of records to return.
        next_token: A token used to resume pagination from the end of a previous request.

    Raises:
        capo_mediapackage.errors.forbidden_exception.ForbiddenException: The client is not authorized to access the requested resource.
        capo_mediapackage.errors.internal_server_error_exception.InternalServerErrorException: An unexpected error occurred.
        capo_mediapackage.errors.not_found_exception.NotFoundException: The requested resource does not exist.
        capo_mediapackage.errors.service_unavailable_exception.ServiceUnavailableException: An unexpected error occurred.
        capo_mediapackage.errors.too_many_requests_exception.TooManyRequestsException: The client has exceeded their resource or throttling limits.
        capo_mediapackage.errors.unprocessable_entity_exception.UnprocessableEntityException: The parameters sent in the request are not valid.
        capo_mediapackage.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_mediapackage.types.list_origin_endpoints_request.ListOriginEndpointsRequest]",
    ) -> OperationResponse[
        "capo_mediapackage.types.list_origin_endpoints_response.ListOriginEndpointsResponse"
    ]:
        import capo_mediapackage._operations.media_package.list_origin_endpoints

        output, http_response = (
            capo_mediapackage._operations.media_package.list_origin_endpoints.list_origin_endpoints(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListOriginEndpoints")
    )
    input_: capo_mediapackage.types.list_origin_endpoints_request.ListOriginEndpointsRequest = {}
    if channel_id is not None:
        input_["channel_id"] = channel_id
    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