getPermission method

Future<GetPermissionResponse> getPermission({
  1. required String permissionArn,
  2. int? permissionVersion,
})

Gets the contents of an AWS RAM permission in JSON format.

May throw InvalidParameterException. May throw MalformedArnException. May throw UnknownResourceException. May throw ServerInternalException. May throw ServiceUnavailableException. May throw OperationNotPermittedException.

Parameter permissionArn : The ARN of the permission.

Parameter permissionVersion : The identifier for the version of the permission.

Implementation

Future<GetPermissionResponse> getPermission({
  required String permissionArn,
  int? permissionVersion,
}) async {
  ArgumentError.checkNotNull(permissionArn, 'permissionArn');
  final $payload = <String, dynamic>{
    'permissionArn': permissionArn,
    if (permissionVersion != null) 'permissionVersion': permissionVersion,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/getpermission',
    exceptionFnMap: _exceptionFns,
  );
  return GetPermissionResponse.fromJson(response);
}