assignTapePool method
Assigns a tape to a tape pool for archiving. The tape assigned to a pool is archived in the S3 storage class that is associated with the pool. When you use your backup application to eject the tape, the tape is archived directly into the S3 storage class (S3 Glacier or S3 Glacier Deep Archive) that corresponds to the pool.
Valid Values: GLACIER
| DEEP_ARCHIVE
May throw InvalidGatewayRequestException. May throw InternalServerError.
Parameter poolId
:
The ID of the pool that you want to add your tape to for archiving. The
tape in this pool is archived in the S3 storage class that is associated
with the pool. When you use your backup application to eject the tape, the
tape is archived directly into the storage class (S3 Glacier or S3 Glacier
Deep Archive) that corresponds to the pool.
Valid Values: GLACIER
| DEEP_ARCHIVE
Parameter tapeARN
:
The unique Amazon Resource Name (ARN) of the virtual tape that you want to
add to the tape pool.
Parameter bypassGovernanceRetention
:
Set permissions to bypass governance retention. If the lock type of the
archived tape is Governance
, the tape's archived age is not
older than RetentionLockInDays
, and the user does not already
have BypassGovernanceRetention
, setting this to TRUE enables
the user to bypass the retention lock. This parameter is set to true by
default for calls from the console.
Valid values: TRUE
| FALSE
Implementation
Future<AssignTapePoolOutput> assignTapePool({
required String poolId,
required String tapeARN,
bool? bypassGovernanceRetention,
}) async {
ArgumentError.checkNotNull(poolId, 'poolId');
_s.validateStringLength(
'poolId',
poolId,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(tapeARN, 'tapeARN');
_s.validateStringLength(
'tapeARN',
tapeARN,
50,
500,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StorageGateway_20130630.AssignTapePool'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PoolId': poolId,
'TapeARN': tapeARN,
if (bypassGovernanceRetention != null)
'BypassGovernanceRetention': bypassGovernanceRetention,
},
);
return AssignTapePoolOutput.fromJson(jsonResponse.body);
}