Skip to content

update_origin_endpoint async

update_origin_endpoint(
    channel_group_name: ResourceName,
    channel_name: ResourceName,
    origin_endpoint_name: ResourceName,
    container_type: ContainerType,
    *,
    config_overrides: Optional[AsyncMediaPackageV2ClientConfig] = None,
    segment: Optional[Segment] = None,
    description: Optional[ResourceDescription] = None,
    startover_window_seconds: Optional[int] = None,
    hls_manifests: Optional[CreateHlsManifests] = None,
    low_latency_hls_manifests: Optional[CreateLowLatencyHlsManifests] = None,
    dash_manifests: Optional[CreateDashManifests] = None,
    mss_manifests: Optional[CreateMssManifests] = None,
    force_endpoint_error_configuration: Optional[
        ForceEndpointErrorConfiguration
    ] = None,
    uri_separator: Optional[UriSeparator] = None,
    stream_name_output_mode: Optional[StreamNameOutputMode] = None,
    e_tag: Optional[EntityTag] = None,
) -> UpdateOriginEndpointResponse

Update the specified origin endpoint. Edit the packaging preferences on an endpoint to optimize the viewing experience. You can't edit the name of the endpoint.

Any edits you make that impact the video output may not be reflected for a few minutes.

Parameters:

  • channel_group_name (ResourceName) –

    The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

  • channel_name (ResourceName) –

    The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

  • origin_endpoint_name (ResourceName) –

    The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint, and and must be unique for your account in the AWS Region and channel.

  • container_type (ContainerType) –

    The type of container attached to this origin endpoint. A container type is a file format that encapsulates one or more media streams, such as audio and video, into a single file.

  • segment (Optional[Segment], default: None ) –

    The segment configuration, including the segment name, duration, and other configuration values.

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

    Any descriptive information that you want to add to the origin endpoint for future identification purposes.

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

    The size of the window (in seconds) to create a window of the live stream that's available for on-demand viewing. Viewers can start-over or catch-up on content that falls within the window. The maximum startover window is 1,209,600 seconds (14 days).

  • hls_manifests (Optional[CreateHlsManifests], default: None ) –

    An HTTP live streaming (HLS) manifest configuration.

  • low_latency_hls_manifests (Optional[CreateLowLatencyHlsManifests], default: None ) –

    A low-latency HLS manifest configuration.

  • dash_manifests (Optional[CreateDashManifests], default: None ) –

    A DASH manifest configuration.

  • mss_manifests (Optional[CreateMssManifests], default: None ) –

    A list of Microsoft Smooth Streaming (MSS) manifest configurations to update for the origin endpoint. This replaces the existing MSS manifest configurations.

  • force_endpoint_error_configuration (Optional[ForceEndpointErrorConfiguration], default: None ) –

    The failover settings for the endpoint.

  • uri_separator (Optional[UriSeparator], default: None ) –

    The separator character to use in generated URIs for this origin endpoint. This setting applies to all manifest types on the endpoint. If you don't specify a value in the update request, the current value is preserved.

  • stream_name_output_mode (Optional[StreamNameOutputMode], default: None ) –

    The output mode for stream names in egress manifests. If you provide a value, it must match the current value. You can't change the stream name output mode after you create the endpoint.

  • e_tag (Optional[EntityTag], default: None ) –

    The expected current Entity Tag (ETag) for the resource. If the specified ETag does not match the resource's current entity tag, the update request will be rejected.

Raises:

  • AccessDeniedException –

    Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.

  • ConflictException –

    Updating or deleting this resource can cause an inconsistent state.

  • InternalServerException –

    Indicates that an error from the service occurred while trying to process a request.

  • ResourceNotFoundException –

    The specified resource doesn't exist.

  • ServiceQuotaExceededException –

    The request would cause a service quota to be exceeded.

  • ThrottlingException –

    The request throughput limit was exceeded.

  • ValidationException –

    The input failed to meet the constraints specified by the AWS service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

Updating an OriginEndpoint

>>> await client.update_origin_endpoint(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', origin_endpoint_name='exampleOriginEndpointTS', container_type='TS', description='Updated description for exampleOriginEndpointTS', startover_window_seconds=600, force_endpoint_error_configuration={'EndpointErrorConditions': ['STALE_MANIFEST', 'INCOMPLETE_MANIFEST', 'MISSING_DRM_KEY', 'SLATE_INPUT']}, uri_separator='HYPHEN', segment={'SegmentDurationSeconds': 7, 'SegmentName': 'segmentName2', 'TsUseAudioRenditionGroup': True, 'IncludeIframeOnlyStreams': False, 'TsIncludeDvbSubtitles': False, 'Scte': {'ScteFilter': ['SPLICE_INSERT']}, 'Encryption': {'ConstantInitializationVector': 'A382A901F3C1F7718512266CFFBB0B7E', 'EncryptionMethod': {'TsEncryptionMethod': 'AES_128'}, 'KeyRotationIntervalSeconds': 300, 'SpekeKeyProvider': {'EncryptionContractConfiguration': {'PresetSpeke20Audio': 'SHARED', 'PresetSpeke20Video': 'SHARED'}, 'ResourceId': 'ResourceId', 'DrmSystems': ['CLEAR_KEY_AES_128'], 'RoleArn': 'arn:aws:iam::123456789012:role/empRole', 'Url': 'https://foo.com', 'CertificateArn': 'arn:aws:acm:us-west-2:123456789012:certificate/0c6a65f1-7bd3-48ac-be17-f38675def22e'}}}, hls_manifests=[{'ManifestName': 'exampleManifest1', 'ChildManifestName': 'exampleChildManifest1', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60, 'UriPathType': 'LEAF'}, {'ManifestName': 'exampleManifest2', 'ChildManifestName': 'exampleManifest2', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60, 'UriPathType': 'LEAF'}], low_latency_hls_manifests=[{'ManifestName': 'exampleLLManifest1', 'ChildManifestName': 'exampleLLChildManifest1', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60, 'UriPathType': 'ROOT'}, {'ManifestName': 'exampleLLManifest2', 'ChildManifestName': 'exampleLLManifest2', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60, 'UriPathType': 'ROOT'}])
Updating an OriginEndpoint with ISM container
>>> await client.update_origin_endpoint(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', origin_endpoint_name='exampleOriginEndpointISM', container_type='ISM', description='Updated description for exampleOriginEndpointISM', startover_window_seconds=600, force_endpoint_error_configuration={'EndpointErrorConditions': ['STALE_MANIFEST', 'INCOMPLETE_MANIFEST', 'MISSING_DRM_KEY', 'SLATE_INPUT']}, uri_separator='HYPHEN', segment={'SegmentDurationSeconds': 2, 'SegmentName': 'segmentName2', 'Encryption': {'EncryptionMethod': {'IsmEncryptionMethod': 'CENC'}, 'SpekeKeyProvider': {'EncryptionContractConfiguration': {'PresetSpeke20Audio': 'SHARED', 'PresetSpeke20Video': 'SHARED'}, 'ResourceId': 'ResourceId', 'DrmSystems': ['PLAYREADY'], 'RoleArn': 'arn:aws:iam::123456789012:role/empRole', 'Url': 'https://speke-key-provider.example.com'}}}, mss_manifests=[{'ManifestName': 'exampleMssManifest1', 'ManifestWindowSeconds': 60, 'ManifestLayout': 'FULL'}, {'ManifestName': 'exampleMssManifest2', 'ManifestWindowSeconds': 30, 'ManifestLayout': 'COMPACT'}])
Source code in docs_src/capo_mediapackagev2/_services/async_media_package_v2.py
async def update_origin_endpoint(
    self,
    channel_group_name: "capo_mediapackagev2.types.resource_name.ResourceName",
    channel_name: "capo_mediapackagev2.types.resource_name.ResourceName",
    origin_endpoint_name: "capo_mediapackagev2.types.resource_name.ResourceName",
    container_type: "capo_mediapackagev2.types.container_type.ContainerType",
    *,
    config_overrides: Optional[AsyncMediaPackageV2ClientConfig] = None,
    segment: Optional["capo_mediapackagev2.types.segment.Segment"] = None,
    description: Optional[
        "capo_mediapackagev2.types.resource_description.ResourceDescription"
    ] = None,
    startover_window_seconds: Optional[int] = None,
    hls_manifests: Optional[
        "capo_mediapackagev2.types.create_hls_manifests.CreateHlsManifests"
    ] = None,
    low_latency_hls_manifests: Optional[
        "capo_mediapackagev2.types.create_low_latency_hls_manifests.CreateLowLatencyHlsManifests"
    ] = None,
    dash_manifests: Optional[
        "capo_mediapackagev2.types.create_dash_manifests.CreateDashManifests"
    ] = None,
    mss_manifests: Optional[
        "capo_mediapackagev2.types.create_mss_manifests.CreateMssManifests"
    ] = None,
    force_endpoint_error_configuration: Optional[
        "capo_mediapackagev2.types.force_endpoint_error_configuration.ForceEndpointErrorConfiguration"
    ] = None,
    uri_separator: Optional[
        "capo_mediapackagev2.types.uri_separator.UriSeparator"
    ] = None,
    stream_name_output_mode: Optional[
        "capo_mediapackagev2.types.stream_name_output_mode.StreamNameOutputMode"
    ] = None,
    e_tag: Optional["capo_mediapackagev2.types.entity_tag.EntityTag"] = None,
) -> "capo_mediapackagev2.types.update_origin_endpoint_response.UpdateOriginEndpointResponse":
    """<p>Update the specified origin endpoint. Edit the packaging preferences on an endpoint to optimize the viewing experience. You can't edit the name of the endpoint.</p> <p>Any edits you make that impact the video output may not be reflected for a few minutes.</p>

    Args:
        channel_group_name: <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
        channel_name: <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group. </p>
        origin_endpoint_name: <p>The name that describes the origin endpoint. The name is the primary identifier for the origin endpoint, and and must be unique for your account in the AWS Region and channel. </p>
        container_type: <p>The type of container attached to this origin endpoint. A container type is a file format that encapsulates one or more media streams, such as audio and video, into a single file. </p>
        segment: <p>The segment configuration, including the segment name, duration, and other configuration values.</p>
        description: <p>Any descriptive information that you want to add to the origin endpoint for future identification purposes.</p>
        startover_window_seconds: <p>The size of the window (in seconds) to create a window of the live stream that's available for on-demand viewing. Viewers can start-over or catch-up on content that falls within the window. The maximum startover window is 1,209,600 seconds (14 days).</p>
        hls_manifests: <p>An HTTP live streaming (HLS) manifest configuration.</p>
        low_latency_hls_manifests: <p>A low-latency HLS manifest configuration.</p>
        dash_manifests: <p>A DASH manifest configuration.</p>
        mss_manifests: <p>A list of Microsoft Smooth Streaming (MSS) manifest configurations to update for the origin endpoint. This replaces the existing MSS manifest configurations.</p>
        force_endpoint_error_configuration: <p>The failover settings for the endpoint.</p>
        uri_separator: <p>The separator character to use in generated URIs for this origin endpoint. This setting applies to all manifest types on the endpoint. If you don't specify a value in the update request, the current value is preserved.</p>
        stream_name_output_mode: <p>The output mode for stream names in egress manifests. If you provide a value, it must match the current value. You can't change the stream name output mode after you create the endpoint.</p>
        e_tag: <p>The expected current Entity Tag (ETag) for the resource. If the specified ETag does not match the resource's current entity tag, the update request will be rejected.</p>

    Raises:
        capo_mediapackagev2.errors.access_denied_exception.AccessDeniedException: <p>Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.</p>
        capo_mediapackagev2.errors.conflict_exception.ConflictException: <p>Updating or deleting this resource can cause an inconsistent state.</p>
        capo_mediapackagev2.errors.internal_server_exception.InternalServerException: <p>Indicates that an error from the service occurred while trying to process a request.</p>
        capo_mediapackagev2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist.</p>
        capo_mediapackagev2.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would cause a service quota to be exceeded.</p>
        capo_mediapackagev2.errors.throttling_exception.ThrottlingException: <p>The request throughput limit was exceeded.</p>
        capo_mediapackagev2.errors.validation_exception.ValidationException: <p>The input failed to meet the constraints specified by the AWS service.</p>
        capo_mediapackagev2.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Updating an OriginEndpoint

        >>> await client.update_origin_endpoint(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', origin_endpoint_name='exampleOriginEndpointTS', container_type='TS', description='Updated description for exampleOriginEndpointTS', startover_window_seconds=600, force_endpoint_error_configuration={'EndpointErrorConditions': ['STALE_MANIFEST', 'INCOMPLETE_MANIFEST', 'MISSING_DRM_KEY', 'SLATE_INPUT']}, uri_separator='HYPHEN', segment={'SegmentDurationSeconds': 7, 'SegmentName': 'segmentName2', 'TsUseAudioRenditionGroup': True, 'IncludeIframeOnlyStreams': False, 'TsIncludeDvbSubtitles': False, 'Scte': {'ScteFilter': ['SPLICE_INSERT']}, 'Encryption': {'ConstantInitializationVector': 'A382A901F3C1F7718512266CFFBB0B7E', 'EncryptionMethod': {'TsEncryptionMethod': 'AES_128'}, 'KeyRotationIntervalSeconds': 300, 'SpekeKeyProvider': {'EncryptionContractConfiguration': {'PresetSpeke20Audio': 'SHARED', 'PresetSpeke20Video': 'SHARED'}, 'ResourceId': 'ResourceId', 'DrmSystems': ['CLEAR_KEY_AES_128'], 'RoleArn': 'arn:aws:iam::123456789012:role/empRole', 'Url': 'https://foo.com', 'CertificateArn': 'arn:aws:acm:us-west-2:123456789012:certificate/0c6a65f1-7bd3-48ac-be17-f38675def22e'}}}, hls_manifests=[{'ManifestName': 'exampleManifest1', 'ChildManifestName': 'exampleChildManifest1', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60, 'UriPathType': 'LEAF'}, {'ManifestName': 'exampleManifest2', 'ChildManifestName': 'exampleManifest2', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60, 'UriPathType': 'LEAF'}], low_latency_hls_manifests=[{'ManifestName': 'exampleLLManifest1', 'ChildManifestName': 'exampleLLChildManifest1', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60, 'UriPathType': 'ROOT'}, {'ManifestName': 'exampleLLManifest2', 'ChildManifestName': 'exampleLLManifest2', 'ScteHls': {'AdMarkerHls': 'DATERANGE'}, 'ManifestWindowSeconds': 30, 'ProgramDateTimeIntervalSeconds': 60, 'UriPathType': 'ROOT'}])
        Updating an OriginEndpoint with ISM container

        >>> await client.update_origin_endpoint(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', origin_endpoint_name='exampleOriginEndpointISM', container_type='ISM', description='Updated description for exampleOriginEndpointISM', startover_window_seconds=600, force_endpoint_error_configuration={'EndpointErrorConditions': ['STALE_MANIFEST', 'INCOMPLETE_MANIFEST', 'MISSING_DRM_KEY', 'SLATE_INPUT']}, uri_separator='HYPHEN', segment={'SegmentDurationSeconds': 2, 'SegmentName': 'segmentName2', 'Encryption': {'EncryptionMethod': {'IsmEncryptionMethod': 'CENC'}, 'SpekeKeyProvider': {'EncryptionContractConfiguration': {'PresetSpeke20Audio': 'SHARED', 'PresetSpeke20Video': 'SHARED'}, 'ResourceId': 'ResourceId', 'DrmSystems': ['PLAYREADY'], 'RoleArn': 'arn:aws:iam::123456789012:role/empRole', 'Url': 'https://speke-key-provider.example.com'}}}, mss_manifests=[{'ManifestName': 'exampleMssManifest1', 'ManifestWindowSeconds': 60, 'ManifestLayout': 'FULL'}, {'ManifestName': 'exampleMssManifest2', 'ManifestWindowSeconds': 30, 'ManifestLayout': 'COMPACT'}])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediapackagev2.types.update_origin_endpoint_request.UpdateOriginEndpointRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediapackagev2.types.update_origin_endpoint_response.UpdateOriginEndpointResponse"
    ]:
        import capo_mediapackagev2._operations.mediapackagev2.update_origin_endpoint

        (
            output,
            http_response,
        ) = await capo_mediapackagev2._operations.mediapackagev2.update_origin_endpoint.async_update_origin_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateOriginEndpoint")
    )
    input_: capo_mediapackagev2.types.update_origin_endpoint_request.UpdateOriginEndpointRequest = {
        "channel_group_name": channel_group_name,
        "channel_name": channel_name,
        "origin_endpoint_name": origin_endpoint_name,
        "container_type": container_type,
    }
    if segment is not None:
        input_["segment"] = segment
    if description is not None:
        input_["description"] = description
    if startover_window_seconds is not None:
        input_["startover_window_seconds"] = startover_window_seconds
    if hls_manifests is not None:
        input_["hls_manifests"] = hls_manifests
    if low_latency_hls_manifests is not None:
        input_["low_latency_hls_manifests"] = low_latency_hls_manifests
    if dash_manifests is not None:
        input_["dash_manifests"] = dash_manifests
    if mss_manifests is not None:
        input_["mss_manifests"] = mss_manifests
    if force_endpoint_error_configuration is not None:
        input_["force_endpoint_error_configuration"] = (
            force_endpoint_error_configuration
        )
    if uri_separator is not None:
        input_["uri_separator"] = uri_separator
    if stream_name_output_mode is not None:
        input_["stream_name_output_mode"] = stream_name_output_mode
    if e_tag is not None:
        input_["e_tag"] = e_tag

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output