revokeSnapshotAccess method
Removes the ability of the specified AWS customer 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.
Parameter accountWithRestoreAccess
:
The identifier of the AWS customer account that can no longer restore the
specified snapshot.
Parameter snapshotIdentifier
:
The identifier of the snapshot that the account can no longer 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.
Implementation
Future<RevokeSnapshotAccessResult> revokeSnapshotAccess({
required String accountWithRestoreAccess,
required String snapshotIdentifier,
String? snapshotClusterIdentifier,
}) async {
ArgumentError.checkNotNull(
accountWithRestoreAccess, 'accountWithRestoreAccess');
_s.validateStringLength(
'accountWithRestoreAccess',
accountWithRestoreAccess,
0,
2147483647,
isRequired: true,
);
ArgumentError.checkNotNull(snapshotIdentifier, 'snapshotIdentifier');
_s.validateStringLength(
'snapshotIdentifier',
snapshotIdentifier,
0,
2147483647,
isRequired: true,
);
_s.validateStringLength(
'snapshotClusterIdentifier',
snapshotClusterIdentifier,
0,
2147483647,
);
final $request = <String, dynamic>{};
$request['AccountWithRestoreAccess'] = accountWithRestoreAccess;
$request['SnapshotIdentifier'] = snapshotIdentifier;
snapshotClusterIdentifier
?.also((arg) => $request['SnapshotClusterIdentifier'] = arg);
final $result = await _protocol.send(
$request,
action: 'RevokeSnapshotAccess',
version: '2012-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['RevokeSnapshotAccessMessage'],
shapes: shapes,
resultWrapper: 'RevokeSnapshotAccessResult',
);
return RevokeSnapshotAccessResult.fromXml($result);
}