describeUsers method

Future<DescribeUsersResponse> describeUsers({
  1. List<Filter>? filters,
  2. int? maxResults,
  3. String? nextToken,
  4. String? userName,
})

Returns a list of users.

May throw InvalidParameterCombinationException. May throw UserNotFoundFault.

Parameter filters : Filter to determine the list of users to return.

Parameter maxResults : The maximum number of records to include in the response. If more records exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

Parameter nextToken : An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

Parameter userName : The name of the user.

Implementation

Future<DescribeUsersResponse> describeUsers({
  List<Filter>? filters,
  int? maxResults,
  String? nextToken,
  String? userName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonMemoryDB.DescribeUsers'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'Filters': filters,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (userName != null) 'UserName': userName,
    },
  );

  return DescribeUsersResponse.fromJson(jsonResponse.body);
}