updateRoom method

Future<UpdateRoomResponse> updateRoom({
  1. required String accountId,
  2. required String roomId,
  3. String? name,
})

Updates room details, such as the room name, for a room in an Amazon Chime Enterprise account.

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

Parameter accountId : The Amazon Chime account ID.

Parameter roomId : The room ID.

Parameter name : The room name.

Implementation

Future<UpdateRoomResponse> updateRoom({
  required String accountId,
  required String roomId,
  String? name,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  ArgumentError.checkNotNull(roomId, 'roomId');
  final $payload = <String, dynamic>{
    if (name != null) 'Name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(accountId)}/rooms/${Uri.encodeComponent(roomId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateRoomResponse.fromJson(response);
}