Skip to main content

backup_vaults

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

Overview

Namebackup_vaults
TypeResource
Idgoogle.backupdr.backup_vaults

Fields

NameDatatypeDescription
namestringOutput only. Identifier. The resource name.
descriptionstringOptional. The description of the BackupVault instance (2048 characters or less).
annotationsobjectOptional. User annotations. See https://google.aip.dev/128#annotations Stores small amounts of arbitrary data.
backupCountstringOutput only. The number of backups in this backup vault.
backupMinimumEnforcedRetentionDurationstringRequired. The default and minimum enforced retention for each backup within the backup vault. The enforced retention for each backup can be extended.
createTimestringOutput only. The time when the instance was created.
deletablebooleanOutput only. Set to true when there are no backups nested under this resource.
effectiveTimestringOptional. Time after which the BackupVault resource is locked.
etagstringOptional. Server specified ETag for the backup vault resource to prevent simultaneous updates from overwiting each other.
labelsobjectOptional. Resource labels to represent user provided metadata. No labels currently defined:
serviceAccountstringOutput only. Service account used by the BackupVault Service for this BackupVault. The user should grant this account permissions in their workload project to enable the service to run backups and restores there.
statestringOutput only. The BackupVault resource instance state.
totalStoredBytesstringOutput only. Total size of the storage used by all backup resources.
uidstringOutput only. Output only Immutable after resource creation until resource deletion.
updateTimestringOutput only. The time when the instance was updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTbackupVaultsId, locationsId, projectsIdGets details of a BackupVault.
listSELECTlocationsId, projectsIdLists BackupVaults in a given project and location.
createINSERTlocationsId, projectsId
deleteDELETEbackupVaultsId, locationsId, projectsIdDeletes a BackupVault.
patchUPDATEbackupVaultsId, locationsId, projectsIdUpdates the settings of a BackupVault.

SELECT examples

Lists BackupVaults in a given project and location.

SELECT
name,
description,
annotations,
backupCount,
backupMinimumEnforcedRetentionDuration,
createTime,
deletable,
effectiveTime,
etag,
labels,
serviceAccount,
state,
totalStoredBytes,
uid,
updateTime
FROM google.backupdr.backup_vaults
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new backup_vaults resource.

/*+ create */
INSERT INTO google.backupdr.backup_vaults (
locationsId,
projectsId,
description,
labels,
backupMinimumEnforcedRetentionDuration,
etag,
effectiveTime,
annotations
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ description }}',
'{{ labels }}',
'{{ backupMinimumEnforcedRetentionDuration }}',
'{{ etag }}',
'{{ effectiveTime }}',
'{{ annotations }}'
;

UPDATE example

Updates a backup_vaults resource.

/*+ update */
UPDATE google.backupdr.backup_vaults
SET
description = '{{ description }}',
labels = '{{ labels }}',
backupMinimumEnforcedRetentionDuration = '{{ backupMinimumEnforcedRetentionDuration }}',
etag = '{{ etag }}',
effectiveTime = '{{ effectiveTime }}',
annotations = '{{ annotations }}'
WHERE
backupVaultsId = '{{ backupVaultsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified backup_vaults resource.

/*+ delete */
DELETE FROM google.backupdr.backup_vaults
WHERE backupVaultsId = '{{ backupVaultsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';