Skip to main content

backup_vaults

Creates, updates, deletes, gets or lists a backup_vaults resource.

Overview

Namebackup_vaults
TypeResource
Idaws.backup.backup_vaults

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
backup_vault_arnstringAn Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault.
backup_vault_namestringThe name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Region where they are created.
creation_datestring (date-time)The date and time that a backup vault is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
creator_request_idstringA unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
encryption_key_arnstringThe server-side encryption key that is used to protect your backups; for example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
encryption_key_typestringThe type of encryption key used for the backup vault. Valid values are CUSTOMER_MANAGED_KMS_KEY for customer-managed keys or Amazon Web Services_OWNED_KMS_KEY for Amazon Web Services-owned keys. (AWS_OWNED_KMS_KEY, CUSTOMER_MANAGED_KMS_KEY)
latest_mpa_approval_team_updateobjectInformation about the latest update to the MPA approval team association for this backup vault.
lock_datestring (date-time)The date and time when Backup Vault Lock configuration cannot be changed or deleted. If you applied Vault Lock to your vault without specifying a lock date, you can change any of your Vault Lock settings, or delete Vault Lock from the vault entirely, at any time. This value is in Unix format, Coordinated Universal Time (UTC), and accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
lockedbooleanA Boolean that indicates whether Backup Vault Lock is currently protecting the backup vault. True means that Vault Lock causes delete or update operations on the recovery points stored in the vault to fail.
max_retention_daysinteger (int64)The Backup Vault Lock setting that specifies the maximum retention period that the vault retains its recovery points. If this parameter is not specified, Vault Lock does not enforce a maximum retention period on the recovery points in the vault (allowing indefinite storage). If specified, any backup or copy job to the vault must have a lifecycle policy with a retention period equal to or shorter than the maximum retention period. If the job's retention period is longer than that maximum retention period, then the vault fails the backup or copy job, and you should either modify your lifecycle settings or use a different vault. Recovery points already stored in the vault prior to Vault Lock are not affected.
min_retention_daysinteger (int64)The Backup Vault Lock setting that specifies the minimum retention period that the vault retains its recovery points. If this parameter is not specified, Vault Lock will not enforce a minimum retention period. If specified, any backup or copy job to the vault must have a lifecycle policy with a retention period equal to or longer than the minimum retention period. If the job's retention period is shorter than that minimum retention period, then the vault fails the backup or copy job, and you should either modify your lifecycle settings or use a different vault. Recovery points already stored in the vault prior to Vault Lock are not affected.
mpa_approval_team_arnstringThe ARN of the MPA approval team associated with this backup vault.
mpa_session_arnstringThe ARN of the MPA session associated with this backup vault.
number_of_recovery_pointsinteger (int64)The number of recovery points that are stored in a backup vault. Recovery point count value displayed in the console can be an approximation. Use ListRecoveryPointsByBackupVault API to obtain the exact count.
source_backup_vault_arnstringThe ARN of the source backup vault from which this restore access backup vault was created.
vault_statestringThe current state of the vault.-> (CREATING, AVAILABLE, FAILED)
vault_typestringThe type of vault described. (BACKUP_VAULT, LOGICALLY_AIR_GAPPED_BACKUP_VAULT, RESTORE_ACCESS_BACKUP_VAULT)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_backup_vaultselectbackup_vault_name, regionbackupVaultAccountIdReturns metadata about a backup vault specified by its name.
list_backup_vaultsselectregionvaultType, shared, nextToken, maxResultsReturns a list of recovery point storage containers along with information about them.
create_logically_air_gapped_backup_vaultinsertbackup_vault_name, region, MinRetentionDays, MaxRetentionDaysCreates 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. Do not include sensitive data, such as passport numbers, in the name of a backup vault.
create_backup_vaultinsertbackup_vault_name, regionCreates a logical container where backups are stored. A CreateBackupVault request includes a name, optionally one or more resource tags, an encryption key, and a request ID. Do not include sensitive data, such as passport numbers, in the name of a backup vault.
associate_backup_vault_mpa_approval_teamupdatebackup_vault_name, region, MpaApprovalTeamArnAssociates an MPA approval team with a backup vault.
disassociate_backup_vault_mpa_approval_teamupdatebackup_vault_name, regionRemoves the association between an MPA approval team and a backup vault, disabling the MPA approval workflow for restore operations.
put_backup_vault_lock_configurationreplacebackup_vault_name, regionApplies Backup Vault Lock to a backup vault, preventing attempts to delete any recovery point stored in or created in a backup vault. Vault Lock also prevents attempts to update the lifecycle policy that controls the retention period of any recovery point currently stored in a backup vault. If specified, Vault Lock enforces a minimum and maximum retention period for future backup and copy jobs that target a backup vault. Backup Vault Lock has been assessed by Cohasset Associates for use in environments that are subject to SEC 17a-4, CFTC, and FINRA regulations. For more information about how Backup Vault Lock relates to these regulations, see the Cohasset Associates Compliance Assessment. For more information, see Backup Vault Lock.
delete_backup_vaultdeletebackup_vault_name, regionDeletes the backup vault identified by its name. A vault can be deleted only if it is empty.
delete_backup_vault_lock_configurationexecbackup_vault_name, regionDeletes Backup Vault Lock from a backup vault specified by a backup vault name. If the Vault Lock configuration is immutable, then you cannot delete Vault Lock using API operations, and you will receive an InvalidRequestException if you attempt to do so. For more information, see Vault Lock in the Backup Developer Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
backup_vault_namestringThe name of the backup vault from which to delete Backup Vault Lock.
regionstringAWS region (default: us-east-1)
backupVaultAccountIdstringThe account ID of the specified backup vault.
maxResultsintegerThe maximum number of items to be returned.
nextTokenstringThe next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
sharedbooleanThis parameter will sort the list of vaults by shared vaults.
vaultTypestringThis parameter will sort the list of vaults by vault type.

SELECT examples

Returns metadata about a backup vault specified by its name.

SELECT
backup_vault_arn,
backup_vault_name,
creation_date,
creator_request_id,
encryption_key_arn,
encryption_key_type,
latest_mpa_approval_team_update,
lock_date,
locked,
max_retention_days,
min_retention_days,
mpa_approval_team_arn,
mpa_session_arn,
number_of_recovery_points,
source_backup_vault_arn,
vault_state,
vault_type
FROM aws.backup.backup_vaults
WHERE backup_vault_name = '{{ backup_vault_name }}' -- required
AND region = '{{ region }}' -- required
AND backupVaultAccountId = '{{ backupVaultAccountId }}'
;

INSERT examples

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. Do not include sensitive data, such as passport numbers, in the name of a backup vault.

INSERT INTO aws.backup.backup_vaults (
BackupVaultTags,
CreatorRequestId,
MinRetentionDays,
MaxRetentionDays,
EncryptionKeyArn,
backup_vault_name,
region
)
SELECT
'{{ BackupVaultTags }}',
'{{ CreatorRequestId }}',
{{ MinRetentionDays }} /* required */,
{{ MaxRetentionDays }} /* required */,
'{{ EncryptionKeyArn }}',
'{{ backup_vault_name }}',
'{{ region }}'
RETURNING
backup_vault_arn,
backup_vault_name,
creation_date,
vault_state
;

UPDATE examples

Associates an MPA approval team with a backup vault.

UPDATE aws.backup.backup_vaults
SET
MpaApprovalTeamArn = '{{ MpaApprovalTeamArn }}',
RequesterComment = '{{ RequesterComment }}'
WHERE
backup_vault_name = '{{ backup_vault_name }}' --required
AND region = '{{ region }}' --required
AND MpaApprovalTeamArn = '{{ MpaApprovalTeamArn }}' --required;

REPLACE examples

Applies Backup Vault Lock to a backup vault, preventing attempts to delete any recovery point stored in or created in a backup vault. Vault Lock also prevents attempts to update the lifecycle policy that controls the retention period of any recovery point currently stored in a backup vault. If specified, Vault Lock enforces a minimum and maximum retention period for future backup and copy jobs that target a backup vault. Backup Vault Lock has been assessed by Cohasset Associates for use in environments that are subject to SEC 17a-4, CFTC, and FINRA regulations. For more information about how Backup Vault Lock relates to these regulations, see the Cohasset Associates Compliance Assessment. For more information, see Backup Vault Lock.

REPLACE aws.backup.backup_vaults
SET
MinRetentionDays = {{ MinRetentionDays }},
MaxRetentionDays = {{ MaxRetentionDays }},
ChangeableForDays = {{ ChangeableForDays }}
WHERE
backup_vault_name = '{{ backup_vault_name }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes the backup vault identified by its name. A vault can be deleted only if it is empty.

DELETE FROM aws.backup.backup_vaults
WHERE backup_vault_name = '{{ backup_vault_name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Deletes Backup Vault Lock from a backup vault specified by a backup vault name. If the Vault Lock configuration is immutable, then you cannot delete Vault Lock using API operations, and you will receive an InvalidRequestException if you attempt to do so. For more information, see Vault Lock in the Backup Developer Guide.

EXEC aws.backup.backup_vaults.delete_backup_vault_lock_configuration
@backup_vault_name='{{ backup_vault_name }}' --required,
@region='{{ region }}' --required
;