createSignalingChannel method
Creates a signaling channel.
CreateSignalingChannel is an asynchronous operation.
May throw AccessDeniedException.
May throw AccountChannelLimitExceededException.
May throw ClientLimitExceededException.
May throw InvalidArgumentException.
May throw ResourceInUseException.
May throw TagsPerResourceExceededLimitException.
Parameter channelName :
A name for the signaling channel that you are creating. It must be unique
for each Amazon Web Services account and Amazon Web Services Region.
Parameter channelType :
A type of the signaling channel that you are creating. Currently,
SINGLE_MASTER is the only supported channel type.
Parameter singleMasterConfiguration :
A structure containing the configuration for the
SINGLE_MASTER channel type. The default configuration for the
channel message's time to live is 60 seconds (1 minute).
Parameter tags :
A set of tags (key-value pairs) that you want to associate with this
channel.
Implementation
Future<CreateSignalingChannelOutput> createSignalingChannel({
required String channelName,
ChannelType? channelType,
SingleMasterConfiguration? singleMasterConfiguration,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'ChannelName': channelName,
if (channelType != null) 'ChannelType': channelType.value,
if (singleMasterConfiguration != null)
'SingleMasterConfiguration': singleMasterConfiguration,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/createSignalingChannel',
exceptionFnMap: _exceptionFns,
);
return CreateSignalingChannelOutput.fromJson(response);
}