backup_vaults
Creates, updates, deletes or gets a backup_vault
resource or lists backup_vaults
in a region
Overview
Name | backup_vaults |
Type | Resource |
Description | Resource Type definition for AWS::Backup::BackupVault |
Id | aws.backup.backup_vaults |
Fields
Name | Datatype | Description |
---|---|---|
access_policy | object | |
backup_vault_name | string | |
backup_vault_tags | object | |
encryption_key_arn | string | |
notifications | object | |
lock_configuration | object | |
backup_vault_arn | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | BackupVaultName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all backup_vaults
in a region.
SELECT
region,
access_policy,
backup_vault_name,
backup_vault_tags,
encryption_key_arn,
notifications,
lock_configuration,
backup_vault_arn
FROM aws.backup.backup_vaults
WHERE region = 'us-east-1';
Gets all properties from an individual backup_vault
.
SELECT
region,
access_policy,
backup_vault_name,
backup_vault_tags,
encryption_key_arn,
notifications,
lock_configuration,
backup_vault_arn
FROM aws.backup.backup_vaults
WHERE region = 'us-east-1' AND data__Identifier = '<BackupVaultName>';
INSERT
example
Use the following StackQL query and manifest file to create a new backup_vault
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.backup.backup_vaults (
BackupVaultName,
region
)
SELECT
'{{ BackupVaultName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.backup.backup_vaults (
AccessPolicy,
BackupVaultName,
BackupVaultTags,
EncryptionKeyArn,
Notifications,
LockConfiguration,
region
)
SELECT
'{{ AccessPolicy }}',
'{{ BackupVaultName }}',
'{{ BackupVaultTags }}',
'{{ EncryptionKeyArn }}',
'{{ Notifications }}',
'{{ LockConfiguration }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: backup_vault
props:
- name: AccessPolicy
value: {}
- name: BackupVaultName
value: '{{ BackupVaultName }}'
- name: BackupVaultTags
value: {}
- name: EncryptionKeyArn
value: '{{ EncryptionKeyArn }}'
- name: Notifications
value:
BackupVaultEvents:
- '{{ BackupVaultEvents[0] }}'
SNSTopicArn: '{{ SNSTopicArn }}'
- name: LockConfiguration
value:
MinRetentionDays: '{{ MinRetentionDays }}'
MaxRetentionDays: '{{ MaxRetentionDays }}'
ChangeableForDays: '{{ ChangeableForDays }}'
DELETE
example
/*+ delete */
DELETE FROM aws.backup.backup_vaults
WHERE data__Identifier = '<BackupVaultName>'
AND region = 'us-east-1';
Permissions
To operate on the backup_vaults
resource, the following permissions are required:
Create
backup:TagResource,
backup:CreateBackupVault,
backup:PutBackupVaultAccessPolicy,
backup:PutBackupVaultNotifications,
backup:PutBackupVaultLockConfiguration,
backup-storage:Mount,
backup-storage:MountCapsule,
kms:CreateGrant,
kms:GenerateDataKey,
kms:Decrypt,
kms:RetireGrant,
kms:DescribeKey
Read
backup:DescribeBackupVault,
backup:GetBackupVaultNotifications,
backup:GetBackupVaultAccessPolicy,
backup:ListTags
Update
backup:DescribeBackupVault,
backup:DeleteBackupVaultAccessPolicy,
backup:DeleteBackupVaultNotifications,
backup:DeleteBackupVaultLockConfiguration,
backup:ListTags,
backup:TagResource,
backup:UntagResource,
backup:PutBackupVaultAccessPolicy,
backup:PutBackupVaultNotifications,
backup:PutBackupVaultLockConfiguration
Delete
backup:DeleteBackupVault
List
backup:ListBackupVaults