updateOriginEndpoint method

Future<UpdateOriginEndpointResponse> updateOriginEndpoint({
  1. required String channelGroupName,
  2. required String channelName,
  3. required ContainerType containerType,
  4. required String originEndpointName,
  5. List<CreateDashManifestConfiguration>? dashManifests,
  6. String? description,
  7. String? eTag,
  8. ForceEndpointErrorConfiguration? forceEndpointErrorConfiguration,
  9. List<CreateHlsManifestConfiguration>? hlsManifests,
  10. List<CreateLowLatencyHlsManifestConfiguration>? lowLatencyHlsManifests,
  11. List<CreateMssManifestConfiguration>? mssManifests,
  12. Segment? segment,
  13. int? startoverWindowSeconds,
  14. UriSeparator? uriSeparator,
})

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.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter channelGroupName : 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.

Parameter channelName : 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.

Parameter 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.

Parameter originEndpointName : 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.

Parameter dashManifests : A DASH manifest configuration.

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

Parameter eTag : 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.

Parameter forceEndpointErrorConfiguration : The failover settings for the endpoint.

Parameter hlsManifests : An HTTP live streaming (HLS) manifest configuration.

Parameter lowLatencyHlsManifests : A low-latency HLS manifest configuration.

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

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

Parameter startoverWindowSeconds : 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).

Parameter uriSeparator : 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.

Implementation

Future<UpdateOriginEndpointResponse> updateOriginEndpoint({
  required String channelGroupName,
  required String channelName,
  required ContainerType containerType,
  required String originEndpointName,
  List<CreateDashManifestConfiguration>? dashManifests,
  String? description,
  String? eTag,
  ForceEndpointErrorConfiguration? forceEndpointErrorConfiguration,
  List<CreateHlsManifestConfiguration>? hlsManifests,
  List<CreateLowLatencyHlsManifestConfiguration>? lowLatencyHlsManifests,
  List<CreateMssManifestConfiguration>? mssManifests,
  Segment? segment,
  int? startoverWindowSeconds,
  UriSeparator? uriSeparator,
}) async {
  final headers = <String, String>{
    if (eTag != null) 'x-amzn-update-if-match': eTag.toString(),
  };
  final $payload = <String, dynamic>{
    'ContainerType': containerType.value,
    if (dashManifests != null) 'DashManifests': dashManifests,
    if (description != null) 'Description': description,
    if (forceEndpointErrorConfiguration != null)
      'ForceEndpointErrorConfiguration': forceEndpointErrorConfiguration,
    if (hlsManifests != null) 'HlsManifests': hlsManifests,
    if (lowLatencyHlsManifests != null)
      'LowLatencyHlsManifests': lowLatencyHlsManifests,
    if (mssManifests != null) 'MssManifests': mssManifests,
    if (segment != null) 'Segment': segment,
    if (startoverWindowSeconds != null)
      'StartoverWindowSeconds': startoverWindowSeconds,
    if (uriSeparator != null) 'UriSeparator': uriSeparator.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/channelGroup/${Uri.encodeComponent(channelGroupName)}/channel/${Uri.encodeComponent(channelName)}/originEndpoint/${Uri.encodeComponent(originEndpointName)}',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return UpdateOriginEndpointResponse.fromJson(response);
}