backup_vaults
Creates, updates, deletes, gets or lists a backup_vaults resource.
Overview
| Name | backup_vaults |
| Type | Resource |
| Id | aws.backup.backup_vaults |
Fields
The following fields are returned by SELECT queries:
- describe_backup_vault
- list_backup_vaults
| Name | Datatype | Description |
|---|---|---|
backup_vault_arn | string | An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault. |
backup_vault_name | string | The 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_date | string (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_id | string | A 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_arn | string | The 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_type | string | The 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_update | object | Information about the latest update to the MPA approval team association for this backup vault. |
lock_date | string (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. |
locked | boolean | A 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_days | integer (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_days | integer (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_arn | string | The ARN of the MPA approval team associated with this backup vault. |
mpa_session_arn | string | The ARN of the MPA session associated with this backup vault. |
number_of_recovery_points | integer (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_arn | string | The ARN of the source backup vault from which this restore access backup vault was created. |
vault_state | string | The current state of the vault.-> (CREATING, AVAILABLE, FAILED) |
vault_type | string | The type of vault described. (BACKUP_VAULT, LOGICALLY_AIR_GAPPED_BACKUP_VAULT, RESTORE_ACCESS_BACKUP_VAULT) |
| Name | Datatype | Description |
|---|---|---|
backup_vault_arn | string | An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault. |
backup_vault_name | string | The 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 Amazon Web Services Region where they are created. (pattern: <code>^[a-zA-Z0-9-_]{2,50}$</code>) |
creation_date | string (date-time) | The date and time a resource backup 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_id | string | A 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_arn | string | A server-side encryption key you can specify to encrypt your backups from services that support full Backup management; for example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. If you specify a key, you must specify its ARN, not its alias. If you do not specify a key, Backup creates a KMS key for you by default. To learn which Backup services support full Backup management and how Backup handles encryption for backups from services that do not yet support full Backup, see Encryption for backups in Backup |
encryption_key_type | string | The 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) |
lock_date | string (date-time) | The date and time when Backup Vault Lock configuration becomes immutable, meaning it cannot be changed or deleted. If you applied Vault Lock to your vault without specifying a lock date, you can change 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. |
locked | boolean | A Boolean value that indicates whether Backup Vault Lock applies to the selected backup vault. If true, Vault Lock prevents delete and update operations on the recovery points in the selected vault. |
max_retention_days | integer (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_days | integer (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 does 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. |
number_of_recovery_points | integer (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. |
vault_state | string | The current state of the vault. (CREATING, AVAILABLE, FAILED) |
vault_type | string | The type of vault in which the described recovery point is stored. (BACKUP_VAULT, LOGICALLY_AIR_GAPPED_BACKUP_VAULT, RESTORE_ACCESS_BACKUP_VAULT) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_backup_vault | select | backup_vault_name, region | backupVaultAccountId | Returns metadata about a backup vault specified by its name. |
list_backup_vaults | select | region | vaultType, shared, nextToken, maxResults | Returns a list of recovery point storage containers along with information about them. |
create_logically_air_gapped_backup_vault | insert | backup_vault_name, region, MinRetentionDays, MaxRetentionDays | 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. | |
create_backup_vault | insert | backup_vault_name, region | Creates 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_team | update | backup_vault_name, region, MpaApprovalTeamArn | Associates an MPA approval team with a backup vault. | |
disassociate_backup_vault_mpa_approval_team | update | backup_vault_name, region | Removes the association between an MPA approval team and a backup vault, disabling the MPA approval workflow for restore operations. | |
put_backup_vault_lock_configuration | replace | backup_vault_name, region | 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. | |
delete_backup_vault | delete | backup_vault_name, region | Deletes the backup vault identified by its name. A vault can be deleted only if it is empty. | |
delete_backup_vault_lock_configuration | exec | backup_vault_name, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
backup_vault_name | string | The name of the backup vault from which to delete Backup Vault Lock. |
region | string | AWS region (default: us-east-1) |
backupVaultAccountId | string | The account ID of the specified backup vault. |
maxResults | integer | The maximum number of items to be returned. |
nextToken | string | The 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. |
shared | boolean | This parameter will sort the list of vaults by shared vaults. |
vaultType | string | This parameter will sort the list of vaults by vault type. |
SELECT examples
- describe_backup_vault
- list_backup_vaults
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 }}'
;
Returns a list of recovery point storage containers along with information about them.
SELECT
backup_vault_arn,
backup_vault_name,
creation_date,
creator_request_id,
encryption_key_arn,
encryption_key_type,
lock_date,
locked,
max_retention_days,
min_retention_days,
number_of_recovery_points,
vault_state,
vault_type
FROM aws.backup.backup_vaults
WHERE region = '{{ region }}' -- required
AND vaultType = '{{ vaultType }}'
AND shared = '{{ shared }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_logically_air_gapped_backup_vault
- create_backup_vault
- Manifest
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
;
Creates 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.
INSERT INTO aws.backup.backup_vaults (
BackupVaultTags,
EncryptionKeyArn,
CreatorRequestId,
backup_vault_name,
region
)
SELECT
'{{ BackupVaultTags }}',
'{{ EncryptionKeyArn }}',
'{{ CreatorRequestId }}',
'{{ backup_vault_name }}',
'{{ region }}'
RETURNING
backup_vault_arn,
backup_vault_name,
creation_date
;
# Description fields are for documentation purposes
- name: backup_vaults
props:
- name: backup_vault_name
value: "{{ backup_vault_name }}"
description: Required parameter for the backup_vaults resource.
- name: region
value: "{{ region }}"
description: Required parameter for the backup_vaults resource.
- name: BackupVaultTags
value: "{{ BackupVaultTags }}"
- name: CreatorRequestId
value: "{{ CreatorRequestId }}"
- name: MinRetentionDays
value: {{ MinRetentionDays }}
- name: MaxRetentionDays
value: {{ MaxRetentionDays }}
- name: EncryptionKeyArn
value: "{{ EncryptionKeyArn }}"
UPDATE examples
- associate_backup_vault_mpa_approval_team
- disassociate_backup_vault_mpa_approval_team
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;
Removes the association between an MPA approval team and a backup vault, disabling the MPA approval workflow for restore operations.
UPDATE aws.backup.backup_vaults
SET
RequesterComment = '{{ RequesterComment }}'
WHERE
backup_vault_name = '{{ backup_vault_name }}' --required
AND region = '{{ region }}' --required;
REPLACE examples
- put_backup_vault_lock_configuration
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
- delete_backup_vault
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
- delete_backup_vault_lock_configuration
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
;