updateChannel method
- required String channelId,
- CdiInputSpecification? cdiInputSpecification,
- List<
OutputDestination> ? destinations, - EncoderSettings? encoderSettings,
- List<
InputAttachment> ? inputAttachments, - InputSpecification? inputSpecification,
- LogLevel? logLevel,
- String? name,
- String? roleArn,
Updates a channel.
May throw BadRequestException. May throw UnprocessableEntityException. May throw InternalServerErrorException. May throw ForbiddenException. May throw BadGatewayException. May throw GatewayTimeoutException. May throw ConflictException.
Parameter channelId
:
channel ID
Parameter cdiInputSpecification
:
Specification of CDI inputs for this channel
Parameter destinations
:
A list of output destinations for this channel.
Parameter encoderSettings
:
The encoder settings for this channel.
Parameter inputSpecification
:
Specification of network and file inputs for this channel
Parameter logLevel
:
The log level to write to CloudWatch Logs.
Parameter name
:
The name of the channel.
Parameter roleArn
:
An optional Amazon Resource Name (ARN) of the role to assume when running
the Channel. If you do not specify this on an update call but the role was
previously set that role will be removed.
Implementation
Future<UpdateChannelResponse> updateChannel({
required String channelId,
CdiInputSpecification? cdiInputSpecification,
List<OutputDestination>? destinations,
EncoderSettings? encoderSettings,
List<InputAttachment>? inputAttachments,
InputSpecification? inputSpecification,
LogLevel? logLevel,
String? name,
String? roleArn,
}) async {
ArgumentError.checkNotNull(channelId, 'channelId');
final $payload = <String, dynamic>{
if (cdiInputSpecification != null)
'cdiInputSpecification': cdiInputSpecification,
if (destinations != null) 'destinations': destinations,
if (encoderSettings != null) 'encoderSettings': encoderSettings,
if (inputAttachments != null) 'inputAttachments': inputAttachments,
if (inputSpecification != null) 'inputSpecification': inputSpecification,
if (logLevel != null) 'logLevel': logLevel.toValue(),
if (name != null) 'name': name,
if (roleArn != null) 'roleArn': roleArn,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/prod/channels/${Uri.encodeComponent(channelId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateChannelResponse.fromJson(response);
}