batchModifyClusterSnapshots method

Future<BatchModifyClusterSnapshotsOutputMessage> batchModifyClusterSnapshots({
  1. required List<String> snapshotIdentifierList,
  2. bool? force,
  3. int? manualSnapshotRetentionPeriod,
})

Modifies the settings for a set of cluster snapshots.

May throw InvalidRetentionPeriodFault. May throw BatchModifyClusterSnapshotsLimitExceededFault.

Parameter snapshotIdentifierList : A list of snapshot identifiers you want to modify.

Parameter force : A boolean value indicating whether to override an exception if the retention period has passed.

Parameter manualSnapshotRetentionPeriod : The number of days that a manual snapshot is retained. If you specify the value -1, the manual snapshot is retained indefinitely.

The number must be either -1 or an integer between 1 and 3,653.

If you decrease the manual snapshot retention period from its current value, existing manual snapshots that fall outside of the new retention period will return an error. If you want to suppress the errors and delete the snapshots, use the force option.

Implementation

Future<BatchModifyClusterSnapshotsOutputMessage> batchModifyClusterSnapshots({
  required List<String> snapshotIdentifierList,
  bool? force,
  int? manualSnapshotRetentionPeriod,
}) async {
  ArgumentError.checkNotNull(
      snapshotIdentifierList, 'snapshotIdentifierList');
  final $request = <String, dynamic>{};
  $request['SnapshotIdentifierList'] = snapshotIdentifierList;
  force?.also((arg) => $request['Force'] = arg);
  manualSnapshotRetentionPeriod
      ?.also((arg) => $request['ManualSnapshotRetentionPeriod'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'BatchModifyClusterSnapshots',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['BatchModifyClusterSnapshotsMessage'],
    shapes: shapes,
    resultWrapper: 'BatchModifyClusterSnapshotsResult',
  );
  return BatchModifyClusterSnapshotsOutputMessage.fromXml($result);
}