listGroups method

Future<ListGroupsResponse> listGroups({
  1. String? maxResults,
  2. String? nextToken,
})

Retrieves a list of groups.

Parameter maxResults : The maximum number of results to be returned per request.

Parameter nextToken : The token for the next set of results, or ''null'' if there are no additional results.

Implementation

Future<ListGroupsResponse> listGroups({
  String? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults],
    if (nextToken != null) 'NextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/greengrass/groups',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListGroupsResponse.fromJson(response);
}