createRoom method

Future<CreateRoomResponse> createRoom({
  1. required String accountId,
  2. required String name,
  3. String? clientRequestToken,
})

Creates a chat room for the specified Amazon Chime Enterprise account.

May throw BadRequestException. May throw ForbiddenException. May throw NotFoundException. May throw ResourceLimitExceededException. May throw ServiceFailureException. May throw ServiceUnavailableException. May throw ThrottledClientException. May throw UnauthorizedClientException.

Parameter accountId : The Amazon Chime account ID.

Parameter name : The room name.

Parameter clientRequestToken : The idempotency token for the request.

Implementation

Future<CreateRoomResponse> createRoom({
  required String accountId,
  required String name,
  String? clientRequestToken,
}) async {
  final $payload = <String, dynamic>{
    'Name': name,
    'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/accounts/${Uri.encodeComponent(accountId)}/rooms',
    exceptionFnMap: _exceptionFns,
  );
  return CreateRoomResponse.fromJson(response);
}