listMemberships method
Returns the memberships that the calling principal can access.
Parameter maxResults :
Request element for ListMemberships to limit the number of responses.
Parameter nextToken :
An optional string that, if supplied, must be copied from the output of a
previous call to ListMemberships. When provided in this manner, the API
fetches the next page of results.
Implementation
Future<ListMembershipsResponse> listMemberships({
int? maxResults,
String? nextToken,
}) async {
final $payload = <String, dynamic>{
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/memberships',
exceptionFnMap: _exceptionFns,
);
return ListMembershipsResponse.fromJson(response);
}