getPermission method
Retrieves the contents of a managed permission in JSON format.
May throw InvalidParameterException.
May throw MalformedArnException.
May throw OperationNotPermittedException.
May throw ServerInternalException.
May throw ServiceUnavailableException.
May throw UnknownResourceException.
Parameter permissionArn :
Specifies the Amazon
Resource Name (ARN) of the permission whose contents you want to
retrieve. To find the ARN for a permission, use either the
ListPermissions operation or go to the Permissions
library page in the RAM console and then choose the name of the
permission. The ARN is displayed on the detail page.
Parameter permissionVersion :
Specifies the version number of the RAM permission to retrieve. If you
don't specify this parameter, the operation retrieves the default version.
To see the list of available versions, use ListPermissionVersions.
Implementation
Future<GetPermissionResponse> getPermission({
required String permissionArn,
int? permissionVersion,
}) async {
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);
}