listPermissions method

Future<ListPermissionsResponse> listPermissions({
  1. int? maxResults,
  2. String? nextToken,
  3. String? resourceType,
})

Lists the AWS RAM permissions.

May throw InvalidParameterException. May throw InvalidNextTokenException. May throw ServerInternalException. May throw ServiceUnavailableException. May throw OperationNotPermittedException.

Parameter maxResults : The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Parameter nextToken : The token for the next page of results.

Parameter resourceType : Specifies the resource type for which to list permissions. For example, to list only permissions that apply to EC2 subnets, specify ec2:Subnet.

Implementation

Future<ListPermissionsResponse> listPermissions({
  int? maxResults,
  String? nextToken,
  String? resourceType,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  final $payload = <String, dynamic>{
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (resourceType != null) 'resourceType': resourceType,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/listpermissions',
    exceptionFnMap: _exceptionFns,
  );
  return ListPermissionsResponse.fromJson(response);
}