Skip to content

update_origin_endpoint

update_origin_endpoint(
    id: __string,
    *,
    config_overrides: Optional[MediaPackageClientConfig] = None,
    authorization: Optional[Authorization] = None,
    cmaf_package: Optional[CmafPackageCreateOrUpdateParameters] = None,
    dash_package: Optional[DashPackage] = None,
    description: Optional[__string] = None,
    hls_package: Optional[HlsPackage] = None,
    manifest_name: Optional[__string] = None,
    mss_package: Optional[MssPackage] = None,
    origination: Optional[Origination] = None,
    startover_window_seconds: Optional[__integer] = None,
    time_delay_seconds: Optional[__integer] = None,
    whitelist: Optional[__listOf__string] = None,
) -> UpdateOriginEndpointResponse

Updates an existing OriginEndpoint.

Parameters:

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

    A short text description of the OriginEndpoint.

  • id (__string) –

    The ID of the OriginEndpoint to update.

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

    A short string that will be appended to the end of the Endpoint URL.

  • origination (Optional[Origination], default: None ) –

    Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination

  • startover_window_seconds (Optional[__integer], default: None ) –

    Maximum duration (in seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.

  • time_delay_seconds (Optional[__integer], default: None ) –

    Amount of delay (in seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.

  • whitelist (Optional[__listOf__string], default: None ) –

    A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.

Raises:

Source code in docs_src/capo_mediapackage/_services/media_package.py
def update_origin_endpoint(
    self,
    id: "capo_mediapackage.types.__string.__string",
    *,
    config_overrides: Optional[MediaPackageClientConfig] = None,
    authorization: Optional[
        "capo_mediapackage.types.authorization.Authorization"
    ] = None,
    cmaf_package: Optional[
        "capo_mediapackage.types.cmaf_package_create_or_update_parameters.CmafPackageCreateOrUpdateParameters"
    ] = None,
    dash_package: Optional[
        "capo_mediapackage.types.dash_package.DashPackage"
    ] = None,
    description: Optional["capo_mediapackage.types.__string.__string"] = None,
    hls_package: Optional["capo_mediapackage.types.hls_package.HlsPackage"] = None,
    manifest_name: Optional["capo_mediapackage.types.__string.__string"] = None,
    mss_package: Optional["capo_mediapackage.types.mss_package.MssPackage"] = None,
    origination: Optional["capo_mediapackage.types.origination.Origination"] = None,
    startover_window_seconds: Optional[
        "capo_mediapackage.types.__integer.__integer"
    ] = None,
    time_delay_seconds: Optional[
        "capo_mediapackage.types.__integer.__integer"
    ] = None,
    whitelist: Optional[
        "capo_mediapackage.types.__list_of__string.__listOf__string"
    ] = None,
) -> "capo_mediapackage.types.update_origin_endpoint_response.UpdateOriginEndpointResponse":
    """Updates an existing OriginEndpoint.

    Args:
        description: A short text description of the OriginEndpoint.
        id: The ID of the OriginEndpoint to update.
        manifest_name: A short string that will be appended to the end of the Endpoint URL.
        origination: Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
        startover_window_seconds: Maximum duration (in seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
        time_delay_seconds: Amount of delay (in seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
        whitelist: A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.

    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.update_origin_endpoint_request.UpdateOriginEndpointRequest]",
    ) -> OperationResponse[
        "capo_mediapackage.types.update_origin_endpoint_response.UpdateOriginEndpointResponse"
    ]:
        import capo_mediapackage._operations.media_package.update_origin_endpoint

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateOriginEndpoint")
    )
    input_: capo_mediapackage.types.update_origin_endpoint_request.UpdateOriginEndpointRequest = {
        "id": id
    }
    if authorization is not None:
        input_["authorization"] = authorization
    if cmaf_package is not None:
        input_["cmaf_package"] = cmaf_package
    if dash_package is not None:
        input_["dash_package"] = dash_package
    if description is not None:
        input_["description"] = description
    if hls_package is not None:
        input_["hls_package"] = hls_package
    if manifest_name is not None:
        input_["manifest_name"] = manifest_name
    if mss_package is not None:
        input_["mss_package"] = mss_package
    if origination is not None:
        input_["origination"] = origination
    if startover_window_seconds is not None:
        input_["startover_window_seconds"] = startover_window_seconds
    if time_delay_seconds is not None:
        input_["time_delay_seconds"] = time_delay_seconds
    if whitelist is not None:
        input_["whitelist"] = whitelist

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