listUsers method

Future<ListUsersResponse> listUsers({
  1. required String brokerId,
  2. int? maxResults,
  3. String? nextToken,

Returns a list of all ActiveMQ users.

May throw NotFoundException. May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException.

Parameter brokerId : The unique ID that Amazon MQ generates for the broker.

Parameter maxResults : The maximum number of ActiveMQ users that can be returned per page (20 by default). This value must be an integer from 5 to 100.

Parameter nextToken : The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.


Future<ListUsersResponse> listUsers({
  required String brokerId,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(brokerId, 'brokerId');
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v1/brokers/${Uri.encodeComponent(brokerId)}/users',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  return ListUsersResponse.fromJson(response);