createLogicallyAirGappedBackupVault method

Future<CreateLogicallyAirGappedBackupVaultOutput> createLogicallyAirGappedBackupVault({
  1. required String backupVaultName,
  2. required int maxRetentionDays,
  3. required int minRetentionDays,
  4. Map<String, String>? backupVaultTags,
  5. String? creatorRequestId,
  6. String? encryptionKeyArn,
})

Creates a logical container to where backups may be copied.

This request includes a name, the Region, the maximum number of retention days, the minimum number of retention days, and optionally can include tags and a creator request ID.

May throw AlreadyExistsException. May throw InvalidParameterValueException. May throw InvalidRequestException. May throw LimitExceededException. May throw MissingParameterValueException. May throw ServiceUnavailableException.

Parameter backupVaultName : The name of a logical container where backups are stored. Logically air-gapped backup vaults are identified by names that are unique to the account used to create them and the Region where they are created.

Parameter maxRetentionDays : The maximum retention period that the vault retains its recovery points.

Parameter minRetentionDays : This setting specifies the minimum retention period that the vault retains its recovery points.

The minimum value accepted is 7 days.

Parameter backupVaultTags : The tags to assign to the vault.

Parameter creatorRequestId : The ID of the creation request.

This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.

Parameter encryptionKeyArn : The ARN of the customer-managed KMS key to use for encrypting the logically air-gapped backup vault. If not specified, the vault will be encrypted with an Amazon Web Services-owned key managed by Amazon Web Services Backup.

Implementation

Future<CreateLogicallyAirGappedBackupVaultOutput>
    createLogicallyAirGappedBackupVault({
  required String backupVaultName,
  required int maxRetentionDays,
  required int minRetentionDays,
  Map<String, String>? backupVaultTags,
  String? creatorRequestId,
  String? encryptionKeyArn,
}) async {
  final $payload = <String, dynamic>{
    'MaxRetentionDays': maxRetentionDays,
    'MinRetentionDays': minRetentionDays,
    if (backupVaultTags != null) 'BackupVaultTags': backupVaultTags,
    'CreatorRequestId': creatorRequestId ?? _s.generateIdempotencyToken(),
    if (encryptionKeyArn != null) 'EncryptionKeyArn': encryptionKeyArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/logically-air-gapped-backup-vaults/${Uri.encodeComponent(backupVaultName)}',
    exceptionFnMap: _exceptionFns,
  );
  return CreateLogicallyAirGappedBackupVaultOutput.fromJson(response);
}