createChannel method

Future<CreateChannelOutput> createChannel({
  1. required String channelName,
  2. required String spaceId,
  3. String? channelDescription,
})

Creates a channel in an AWS re:Post Private private re:Post.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter channelName : The name for the channel. This must be unique per private re:Post.

Parameter spaceId : The unique ID of the private re:Post.

Parameter channelDescription : A description for the channel. This is used only to help you identify this channel.

Implementation

Future<CreateChannelOutput> createChannel({
  required String channelName,
  required String spaceId,
  String? channelDescription,
}) async {
  final $payload = <String, dynamic>{
    'channelName': channelName,
    if (channelDescription != null) 'channelDescription': channelDescription,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/spaces/${Uri.encodeComponent(spaceId)}/channels',
    exceptionFnMap: _exceptionFns,
  );
  return CreateChannelOutput.fromJson(response);
}