createSignalingChannel method

Future<CreateSignalingChannelOutput> createSignalingChannel({
  1. required String channelName,
  2. ChannelType? channelType,
  3. SingleMasterConfiguration? singleMasterConfiguration,
  4. List<Tag>? tags,
})

Creates a signaling channel.

CreateSignalingChannel is an asynchronous operation.

May throw InvalidArgumentException. May throw ClientLimitExceededException. May throw AccountChannelLimitExceededException. May throw ResourceInUseException. May throw AccessDeniedException. May throw TagsPerResourceExceededLimitException.

Parameter channelName : A name for the signaling channel that you are creating. It must be unique for each AWS account and AWS 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.

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 {
  ArgumentError.checkNotNull(channelName, 'channelName');
  _s.validateStringLength(
    'channelName',
    channelName,
    1,
    256,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'ChannelName': channelName,
    if (channelType != null) 'ChannelType': channelType.toValue(),
    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);
}