updateRoom method
Updates a room’s configuration.
May throw AccessDeniedException.
May throw PendingVerification.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter identifier :
Identifier of the room to be updated. Currently this must be an ARN.
Parameter loggingConfigurationIdentifiers :
Array of logging-configuration identifiers attached to the room.
Parameter maximumMessageLength :
The maximum number of characters in a single message. Messages are
expected to be UTF-8 encoded and this limit applies specifically to
rune/code-point count, not number of bytes. Default: 500.
Parameter maximumMessageRatePerSecond :
Maximum number of messages per second that can be sent to the room (by all
clients). Default: 10.
Parameter messageReviewHandler :
Configuration information for optional review of messages. Specify an
empty uri string to disassociate a message review handler
from the specified room.
Parameter name :
Room name. The value does not need to be unique.
Implementation
Future<UpdateRoomResponse> updateRoom({
required String identifier,
List<String>? loggingConfigurationIdentifiers,
int? maximumMessageLength,
int? maximumMessageRatePerSecond,
MessageReviewHandler? messageReviewHandler,
String? name,
}) async {
_s.validateNumRange(
'maximumMessageLength',
maximumMessageLength,
1,
500,
);
_s.validateNumRange(
'maximumMessageRatePerSecond',
maximumMessageRatePerSecond,
1,
100,
);
final $payload = <String, dynamic>{
'identifier': identifier,
if (loggingConfigurationIdentifiers != null)
'loggingConfigurationIdentifiers': loggingConfigurationIdentifiers,
if (maximumMessageLength != null)
'maximumMessageLength': maximumMessageLength,
if (maximumMessageRatePerSecond != null)
'maximumMessageRatePerSecond': maximumMessageRatePerSecond,
if (messageReviewHandler != null)
'messageReviewHandler': messageReviewHandler,
if (name != null) 'name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/UpdateRoom',
exceptionFnMap: _exceptionFns,
);
return UpdateRoomResponse.fromJson(response);
}