Skip to content

create_origin_endpoint

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

Creates a new OriginEndpoint record.

Parameters:

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

    The ID of the Channel that the OriginEndpoint will be associated with. This cannot be changed after the OriginEndpoint is created.

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

    A short text description of the OriginEndpoint.

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

    The ID of the OriginEndpoint. The ID must be unique within the region and it cannot be changed after the OriginEndpoint is created.

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

    A short string that will be used as the filename of the OriginEndpoint URL (defaults to "index").

  • 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 (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 (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 create_origin_endpoint(
    self,
    *,
    config_overrides: Optional[MediaPackageClientConfig] = None,
    authorization: Optional[
        "capo_mediapackage.types.authorization.Authorization"
    ] = None,
    channel_id: Optional["capo_mediapackage.types.__string.__string"] = 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,
    id: Optional["capo_mediapackage.types.__string.__string"] = 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,
    tags: Optional["capo_mediapackage.types.tags.Tags"] = 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.create_origin_endpoint_response.CreateOriginEndpointResponse":
    """Creates a new OriginEndpoint record.

    Args:
        channel_id: The ID of the Channel that the OriginEndpoint will be associated with. This cannot be changed after the OriginEndpoint is created.
        description: A short text description of the OriginEndpoint.
        id: The ID of the OriginEndpoint. The ID must be unique within the region and it cannot be changed after the OriginEndpoint is created.
        manifest_name: A short string that will be used as the filename of the OriginEndpoint URL (defaults to "index").
        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 (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 (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.create_origin_endpoint_request.CreateOriginEndpointRequest]",
    ) -> OperationResponse[
        "capo_mediapackage.types.create_origin_endpoint_response.CreateOriginEndpointResponse"
    ]:
        import capo_mediapackage._operations.media_package.create_origin_endpoint

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateOriginEndpoint")
    )
    input_: capo_mediapackage.types.create_origin_endpoint_request.CreateOriginEndpointRequest = {}
    if authorization is not None:
        input_["authorization"] = authorization
    if channel_id is not None:
        input_["channel_id"] = channel_id
    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 id is not None:
        input_["id"] = id
    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 tags is not None:
        input_["tags"] = tags
    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