listInvitations method

Future<ListInvitationsOutput> listInvitations({
  1. int? maxResults,
  2. String? nextToken,
})

Returns a list of all invitations for the current AWS account.

Applies only to Hyperledger Fabric.

May throw InvalidRequestException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ResourceLimitExceededException. May throw InternalServiceErrorException.

Parameter maxResults : The maximum number of invitations to return.

Parameter nextToken : The pagination token that indicates the next set of results to retrieve.

Implementation

Future<ListInvitationsOutput> listInvitations({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    128,
  );
  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: '/invitations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListInvitationsOutput.fromJson(response);
}