revokeSnapshotAccess method
Removes the ability of the specified Amazon Web Services account to restore the specified snapshot. If the account is currently restoring the snapshot, the restore will run to completion.
For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide.
May throw AccessToSnapshotDeniedFault.
May throw AuthorizationNotFoundFault.
May throw ClusterSnapshotNotFoundFault.
May throw UnsupportedOperationFault.
Parameter accountWithRestoreAccess :
The identifier of the Amazon Web Services account that can no longer
restore the specified snapshot.
Parameter snapshotArn :
The Amazon Resource Name (ARN) of the snapshot associated with the message
to revoke access.
Parameter snapshotClusterIdentifier :
The identifier of the cluster the snapshot was created from. This
parameter is required if your IAM user has a policy containing a snapshot
resource element that specifies anything other than * for the cluster
name.
Parameter snapshotIdentifier :
The identifier of the snapshot that the account can no longer access.
Implementation
Future<RevokeSnapshotAccessResult> revokeSnapshotAccess({
required String accountWithRestoreAccess,
String? snapshotArn,
String? snapshotClusterIdentifier,
String? snapshotIdentifier,
}) async {
final $request = <String, String>{
'AccountWithRestoreAccess': accountWithRestoreAccess,
if (snapshotArn != null) 'SnapshotArn': snapshotArn,
if (snapshotClusterIdentifier != null)
'SnapshotClusterIdentifier': snapshotClusterIdentifier,
if (snapshotIdentifier != null) 'SnapshotIdentifier': snapshotIdentifier,
};
final $result = await _protocol.send(
$request,
action: 'RevokeSnapshotAccess',
version: '2012-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'RevokeSnapshotAccessResult',
);
return RevokeSnapshotAccessResult.fromXml($result);
}