listRooms method

Future<ListRoomsResponse> listRooms({
  1. String? loggingConfigurationIdentifier,
  2. int? maxResults,
  3. String? messageReviewHandlerUri,
  4. String? name,
  5. String? nextToken,
})

Gets summary information about all your rooms in the AWS region where the API request is processed. Results are sorted in descending order of updateTime.

May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter loggingConfigurationIdentifier : Logging-configuration identifier.

Parameter maxResults : Maximum number of rooms to return. Default: 50.

Parameter messageReviewHandlerUri : Filters the list to match the specified message review handler URI.

Parameter name : Filters the list to match the specified room name.

Parameter nextToken : The first room to retrieve. This is used for pagination; see the nextToken response field.

Implementation

Future<ListRoomsResponse> listRooms({
  String? loggingConfigurationIdentifier,
  int? maxResults,
  String? messageReviewHandlerUri,
  String? name,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $payload = <String, dynamic>{
    if (loggingConfigurationIdentifier != null)
      'loggingConfigurationIdentifier': loggingConfigurationIdentifier,
    if (maxResults != null) 'maxResults': maxResults,
    if (messageReviewHandlerUri != null)
      'messageReviewHandlerUri': messageReviewHandlerUri,
    if (name != null) 'name': name,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/ListRooms',
    exceptionFnMap: _exceptionFns,
  );
  return ListRoomsResponse.fromJson(response);
}