updateOriginEndpoint method

Future<UpdateOriginEndpointResponse> updateOriginEndpoint({
  1. required String id,
  2. Authorization? authorization,
  3. CmafPackageCreateOrUpdateParameters? cmafPackage,
  4. DashPackage? dashPackage,
  5. String? description,
  6. HlsPackage? hlsPackage,
  7. String? manifestName,
  8. MssPackage? mssPackage,
  9. Origination? origination,
  10. int? startoverWindowSeconds,
  11. int? timeDelaySeconds,
  12. List<String>? whitelist,
})

Updates an existing OriginEndpoint.

May throw UnprocessableEntityException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException.

Parameter id : The ID of the OriginEndpoint to update.

Parameter description : A short text description of the OriginEndpoint.

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

Parameter 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

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

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

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

Implementation

Future<UpdateOriginEndpointResponse> updateOriginEndpoint({
  required String id,
  Authorization? authorization,
  CmafPackageCreateOrUpdateParameters? cmafPackage,
  DashPackage? dashPackage,
  String? description,
  HlsPackage? hlsPackage,
  String? manifestName,
  MssPackage? mssPackage,
  Origination? origination,
  int? startoverWindowSeconds,
  int? timeDelaySeconds,
  List<String>? whitelist,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  final $payload = <String, dynamic>{
    if (authorization != null) 'authorization': authorization,
    if (cmafPackage != null) 'cmafPackage': cmafPackage,
    if (dashPackage != null) 'dashPackage': dashPackage,
    if (description != null) 'description': description,
    if (hlsPackage != null) 'hlsPackage': hlsPackage,
    if (manifestName != null) 'manifestName': manifestName,
    if (mssPackage != null) 'mssPackage': mssPackage,
    if (origination != null) 'origination': origination.toValue(),
    if (startoverWindowSeconds != null)
      'startoverWindowSeconds': startoverWindowSeconds,
    if (timeDelaySeconds != null) 'timeDelaySeconds': timeDelaySeconds,
    if (whitelist != null) 'whitelist': whitelist,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/origin_endpoints/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateOriginEndpointResponse.fromJson(response);
}