updateOriginEndpoint

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.

Samples

// Updating an OriginEndpoint
val resp = mediaPackageV2Client.updateOriginEndpoint {
    channelGroupName = "exampleChannelGroup"
    channelName = "exampleChannel"
    originEndpointName = "exampleOriginEndpointTS"
    containerType = ContainerType.fromValue("TS")
    description = "Updated description for exampleOriginEndpointTS"
    startoverWindowSeconds = 600
    forceEndpointErrorConfiguration = ForceEndpointErrorConfiguration {
        endpointErrorConditions = listOf<EndpointErrorCondition>(
            EndpointErrorCondition.fromValue("STALE_MANIFEST"),
            EndpointErrorCondition.fromValue("INCOMPLETE_MANIFEST"),
            EndpointErrorCondition.fromValue("MISSING_DRM_KEY"),
            EndpointErrorCondition.fromValue("SLATE_INPUT")
        )
    }
    uriSeparator = UriSeparator.fromValue("HYPHEN")
    segment = Segment {
        segmentDurationSeconds = 7
        segmentName = "segmentName2"
        tsUseAudioRenditionGroup = true
        includeIframeOnlyStreams = false
        tsIncludeDvbSubtitles = false
        scte = Scte {
            scteFilter = listOf<ScteFilter>(
                ScteFilter.fromValue("SPLICE_INSERT")
            )
        }
        encryption = Encryption {
            constantInitializationVector = "A382A901F3C1F7718512266CFFBB0B7E"
            encryptionMethod = EncryptionMethod {
                tsEncryptionMethod = TsEncryptionMethod.fromValue("AES_128")
            }
            keyRotationIntervalSeconds = 300
            spekeKeyProvider = SpekeKeyProvider {
                encryptionContractConfiguration = EncryptionContractConfiguration {
                    presetSpeke20Audio = PresetSpeke20Audio.fromValue("SHARED")
                    presetSpeke20Video = PresetSpeke20Video.fromValue("SHARED")
                }
                resourceId = "ResourceId"
                drmSystems = listOf<DrmSystem>(
                    DrmSystem.fromValue("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"
            }
        }
    }
    hlsManifests = listOf<CreateHlsManifestConfiguration>(
        CreateHlsManifestConfiguration {
            manifestName = "exampleManifest1"
            childManifestName = "exampleChildManifest1"
            scteHls = ScteHls {
                adMarkerHls = AdMarkerHls.fromValue("DATERANGE")
            }
            manifestWindowSeconds = 30
            programDateTimeIntervalSeconds = 60
            uriPathType = UriPathType.fromValue("LEAF")
        },
        CreateHlsManifestConfiguration {
            manifestName = "exampleManifest2"
            childManifestName = "exampleManifest2"
            scteHls = ScteHls {
                adMarkerHls = AdMarkerHls.fromValue("DATERANGE")
            }
            manifestWindowSeconds = 30
            programDateTimeIntervalSeconds = 60
            uriPathType = UriPathType.fromValue("LEAF")
        }            
    )
    lowLatencyHlsManifests = listOf<CreateLowLatencyHlsManifestConfiguration>(
        CreateLowLatencyHlsManifestConfiguration {
            manifestName = "exampleLLManifest1"
            childManifestName = "exampleLLChildManifest1"
            scteHls = ScteHls {
                adMarkerHls = AdMarkerHls.fromValue("DATERANGE")
            }
            manifestWindowSeconds = 30
            programDateTimeIntervalSeconds = 60
            uriPathType = UriPathType.fromValue("ROOT")
        },
        CreateLowLatencyHlsManifestConfiguration {
            manifestName = "exampleLLManifest2"
            childManifestName = "exampleLLManifest2"
            scteHls = ScteHls {
                adMarkerHls = AdMarkerHls.fromValue("DATERANGE")
            }
            manifestWindowSeconds = 30
            programDateTimeIntervalSeconds = 60
            uriPathType = UriPathType.fromValue("ROOT")
        }            
    )
}
// Updating an OriginEndpoint with ISM container
val resp = mediaPackageV2Client.updateOriginEndpoint {
    channelGroupName = "exampleChannelGroup"
    channelName = "exampleChannel"
    originEndpointName = "exampleOriginEndpointISM"
    containerType = ContainerType.fromValue("ISM")
    description = "Updated description for exampleOriginEndpointISM"
    startoverWindowSeconds = 600
    forceEndpointErrorConfiguration = ForceEndpointErrorConfiguration {
        endpointErrorConditions = listOf<EndpointErrorCondition>(
            EndpointErrorCondition.fromValue("STALE_MANIFEST"),
            EndpointErrorCondition.fromValue("INCOMPLETE_MANIFEST"),
            EndpointErrorCondition.fromValue("MISSING_DRM_KEY"),
            EndpointErrorCondition.fromValue("SLATE_INPUT")
        )
    }
    uriSeparator = UriSeparator.fromValue("HYPHEN")
    segment = Segment {
        segmentDurationSeconds = 2
        segmentName = "segmentName2"
        encryption = Encryption {
            encryptionMethod = EncryptionMethod {
                ismEncryptionMethod = IsmEncryptionMethod.fromValue("CENC")
            }
            spekeKeyProvider = SpekeKeyProvider {
                encryptionContractConfiguration = EncryptionContractConfiguration {
                    presetSpeke20Audio = PresetSpeke20Audio.fromValue("SHARED")
                    presetSpeke20Video = PresetSpeke20Video.fromValue("SHARED")
                }
                resourceId = "ResourceId"
                drmSystems = listOf<DrmSystem>(
                    DrmSystem.fromValue("PLAYREADY")
                )
                roleArn = "arn:aws:iam::123456789012:role/empRole"
                url = "https://speke-key-provider.example.com"
            }
        }
    }
    mssManifests = listOf<CreateMssManifestConfiguration>(
        CreateMssManifestConfiguration {
            manifestName = "exampleMssManifest1"
            manifestWindowSeconds = 60
            manifestLayout = MssManifestLayout.fromValue("FULL")
        },
        CreateMssManifestConfiguration {
            manifestName = "exampleMssManifest2"
            manifestWindowSeconds = 30
            manifestLayout = MssManifestLayout.fromValue("COMPACT")
        }            
    )
}