Skip to main content

backup_vaults

Creates, updates, deletes or gets a backup_vault resource or lists backup_vaults in a region

Overview

Namebackup_vaults
TypeResource
DescriptionResource Type definition for AWS::Backup::BackupVault
Idawscc.backup.backup_vaults

Fields

NameDatatypeDescription
access_policyobject
backup_vault_namestring
backup_vault_tagsobject
encryption_key_arnstring
notificationsobject
lock_configurationobject
backup_vault_arnstring
regionstringAWS region.

For more information, see AWS::Backup::BackupVault.

Methods

NameResourceAccessible byRequired Params
create_resourcebackup_vaultsINSERTBackupVaultName, region
delete_resourcebackup_vaultsDELETEIdentifier, region
update_resourcebackup_vaultsUPDATEIdentifier, PatchDocument, region
list_resourcesbackup_vaults_list_onlySELECTregion
get_resourcebackup_vaultsSELECTIdentifier, region

SELECT examples

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 awscc.backup.backup_vaults
WHERE
region = '{{ region }}' AND
Identifier = '{{ backup_vault_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new backup_vault resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.backup.backup_vaults (
BackupVaultName,
region
)
SELECT
'{{ backup_vault_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a backup_vault resource, using stack-deploy.

/*+ update */
UPDATE awscc.backup.backup_vaults
SET PatchDocument = string('{{ {
"AccessPolicy": access_policy,
"BackupVaultTags": backup_vault_tags,
"Notifications": notifications,
"LockConfiguration": lock_configuration
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ backup_vault_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.backup.backup_vaults
WHERE
Identifier = '{{ backup_vault_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the backup_vaults resource, the following permissions are required:

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