updateChannel method
- required String arn,
- String? adConfigurationArn,
- bool? authorized,
- ContainerFormat? containerFormat,
- bool? insecureIngest,
- ChannelLatencyMode? latencyMode,
- MultitrackInputConfiguration? multitrackInputConfiguration,
- String? name,
- String? playbackRestrictionPolicyArn,
- TranscodePreset? preset,
- String? recordingConfigurationArn,
- ChannelType? type,
Updates a channel's configuration. Live channels cannot be updated. You must stop the ongoing stream, update the channel, and restart the stream for the changes to take effect.
May throw AccessDeniedException.
May throw ConflictException.
May throw PendingVerification.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter arn :
ARN of the channel to be updated.
Parameter adConfigurationArn :
ARN of the ad configuration associated with the channel.
Parameter authorized :
Whether the channel is private (enabled for playback authorization).
Parameter containerFormat :
Indicates which content-packaging format is used (MPEG-TS or fMP4). If
multitrackInputConfiguration is specified and
enabled is true, then
containerFormat is required and must be set to
FRAGMENTED_MP4. Otherwise, containerFormat may
be set to TS or FRAGMENTED_MP4. Default:
TS.
Parameter insecureIngest :
Whether the channel allows insecure RTMP and SRT ingest. Default:
false.
Parameter latencyMode :
Channel latency mode. Use NORMAL to broadcast and deliver
live video up to Full HD. Use LOW for near-real-time
interaction with viewers.
Parameter multitrackInputConfiguration :
Object specifying multitrack input configuration. Default: no multitrack
input configuration is specified.
Parameter name :
Channel name.
Parameter playbackRestrictionPolicyArn :
Playback-restriction-policy ARN. A valid ARN value here both specifies the
ARN and enables playback restriction. If this is set to an empty string,
playback restriction policy is disabled.
Parameter preset :
Optional transcode preset for the channel. This is selectable only for
ADVANCED_HD and ADVANCED_SD channel types. For
those channel types, the default preset is
HIGHER_BANDWIDTH_DELIVERY. For other channel types
(BASIC and STANDARD), preset is the
empty string ("").
Parameter recordingConfigurationArn :
Recording-configuration ARN. A valid ARN value here both specifies the ARN
and enables recording. If this is set to an empty string, recording is
disabled.
Parameter type :
Channel type, which determines the allowable resolution and bitrate. If
you exceed the allowable input resolution or bitrate, the stream probably
will disconnect immediately. Default: STANDARD. For
details, see Channel
Types.
Implementation
Future<UpdateChannelResponse> updateChannel({
required String arn,
String? adConfigurationArn,
bool? authorized,
ContainerFormat? containerFormat,
bool? insecureIngest,
ChannelLatencyMode? latencyMode,
MultitrackInputConfiguration? multitrackInputConfiguration,
String? name,
String? playbackRestrictionPolicyArn,
TranscodePreset? preset,
String? recordingConfigurationArn,
ChannelType? type,
}) async {
final $payload = <String, dynamic>{
'arn': arn,
if (adConfigurationArn != null) 'adConfigurationArn': adConfigurationArn,
if (authorized != null) 'authorized': authorized,
if (containerFormat != null) 'containerFormat': containerFormat.value,
if (insecureIngest != null) 'insecureIngest': insecureIngest,
if (latencyMode != null) 'latencyMode': latencyMode.value,
if (multitrackInputConfiguration != null)
'multitrackInputConfiguration': multitrackInputConfiguration,
if (name != null) 'name': name,
if (playbackRestrictionPolicyArn != null)
'playbackRestrictionPolicyArn': playbackRestrictionPolicyArn,
if (preset != null) 'preset': preset.value,
if (recordingConfigurationArn != null)
'recordingConfigurationArn': recordingConfigurationArn,
if (type != null) 'type': type.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/UpdateChannel',
exceptionFnMap: _exceptionFns,
);
return UpdateChannelResponse.fromJson(response);
}