updateChannel method
Update the specified channel. You can edit if MediaPackage sends ingest or egress access logs to the CloudWatch log group, if content will be encrypted, the description on a channel, and your channel's policy settings. You can't edit the name of the channel or CloudFront distribution details.
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 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 description :
Any descriptive information that you want to add to the channel 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 inputSwitchConfiguration :
The configuration for input switching based on the media quality
confidence score (MQCS) as provided from AWS Elemental MediaLive. This
setting is valid only when InputType is CMAF.
Parameter outputHeaderConfiguration :
The settings for what common media server data (CMSD) headers AWS
Elemental MediaPackage includes in responses to the CDN. This setting is
valid only when InputType is CMAF.
Implementation
Future<UpdateChannelResponse> updateChannel({
required String channelGroupName,
required String channelName,
String? description,
String? eTag,
InputSwitchConfiguration? inputSwitchConfiguration,
OutputHeaderConfiguration? outputHeaderConfiguration,
}) async {
final headers = <String, String>{
if (eTag != null) 'x-amzn-update-if-match': eTag.toString(),
};
final $payload = <String, dynamic>{
if (description != null) 'Description': description,
if (inputSwitchConfiguration != null)
'InputSwitchConfiguration': inputSwitchConfiguration,
if (outputHeaderConfiguration != null)
'OutputHeaderConfiguration': outputHeaderConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/channelGroup/${Uri.encodeComponent(channelGroupName)}/channel/${Uri.encodeComponent(channelName)}/',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return UpdateChannelResponse.fromJson(response);
}