getGroups method

Future<GetGroupsResult> getGroups({
  1. String? nextToken,
})

Retrieves all active group details.

May throw InvalidRequestException. May throw ThrottledException.

Parameter nextToken : Pagination token.

Implementation

Future<GetGroupsResult> getGroups({
  String? nextToken,
}) async {
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/Groups',
    exceptionFnMap: _exceptionFns,
  );
  return GetGroupsResult.fromJson(response);
}