updateAutomaticTapeCreationPolicy method
Future<UpdateAutomaticTapeCreationPolicyOutput>
updateAutomaticTapeCreationPolicy({
- required List<
AutomaticTapeCreationRule> automaticTapeCreationRules, - required String gatewayARN,
Updates the automatic tape creation policy of a gateway. Use this to update the policy with a new set of automatic tape creation rules. This is only supported for tape gateways.
By default, there is no automatic tape creation policy.
May throw InvalidGatewayRequestException. May throw InternalServerError.
Parameter automaticTapeCreationRules
:
An automatic tape creation policy consists of a list of automatic tape
creation rules. The rules determine when and how to automatically create
new tapes.
Implementation
Future<UpdateAutomaticTapeCreationPolicyOutput>
updateAutomaticTapeCreationPolicy({
required List<AutomaticTapeCreationRule> automaticTapeCreationRules,
required String gatewayARN,
}) async {
ArgumentError.checkNotNull(
automaticTapeCreationRules, 'automaticTapeCreationRules');
ArgumentError.checkNotNull(gatewayARN, 'gatewayARN');
_s.validateStringLength(
'gatewayARN',
gatewayARN,
50,
500,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'StorageGateway_20130630.UpdateAutomaticTapeCreationPolicy'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AutomaticTapeCreationRules': automaticTapeCreationRules,
'GatewayARN': gatewayARN,
},
);
return UpdateAutomaticTapeCreationPolicyOutput.fromJson(jsonResponse.body);
}