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

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Identifier. Name of the backup vault to create. It must have the format"projects/{project}/locations/{location}/backupVaults/{backupvault}". {backupvault} cannot be changed after creation. It must be between 3-63 characters long and must be unique within the project and location.
accessRestrictionstringOptional. Note: This field is added for future use case and will not be supported in the current release. Access restriction for the backup vault. Default value is WITHIN_ORGANIZATION if not provided during creation.
annotationsobjectOptional. User annotations. See https://google.aip.dev/128#annotations Stores small amounts of arbitrary data.
backupCountstring (int64)Output only. The number of backups in this backup vault.
backupMinimumEnforcedRetentionDurationstring (google-duration)Required. The default and minimum enforced retention for each backup within the backup vault. The enforced retention for each backup can be extended.
createTimestring (google-datetime)Output only. The time when the instance was created.
deletablebooleanOutput only. Set to true when there are no backups nested under this resource.
descriptionstringOptional. The description of the BackupVault instance (2048 characters or less).
effectiveTimestring (google-datetime)Optional. 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.
totalStoredBytesstring (int64)Output only. Total size of the storage used by all backup resources.
uidstringOutput only. Immutable after resource creation until resource deletion.
updateTimestring (google-datetime)Output only. The time when the instance was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, backupVaultsIdviewGets details of a BackupVault.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderBy, viewLists BackupVaults in a given project and location.
createinsertprojectsId, locationsIdbackupVaultId, requestId, validateOnlyCreates a new BackupVault in a given project and location.
patchupdateprojectsId, locationsId, backupVaultsIdupdateMask, requestId, validateOnly, force, forceUpdateAccessRestrictionUpdates the settings of a BackupVault.
deletedeleteprojectsId, locationsId, backupVaultsIdrequestId, force, etag, validateOnly, allowMissing, ignoreBackupPlanReferencesDeletes a BackupVault.

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
backupVaultsIdstring
locationsIdstring
projectsIdstring
allowMissingboolean
backupVaultIdstring
etagstring
filterstring
forceboolean
forceUpdateAccessRestrictionboolean
ignoreBackupPlanReferencesboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)
validateOnlyboolean
viewstring

SELECT examples

Gets details of a BackupVault.

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

INSERT examples

Creates a new BackupVault in a given project and location.

INSERT INTO google.backupdr.backup_vaults (
data__description,
data__labels,
data__backupMinimumEnforcedRetentionDuration,
data__etag,
data__effectiveTime,
data__annotations,
data__accessRestriction,
projectsId,
locationsId,
backupVaultId,
requestId,
validateOnly
)
SELECT
'{{ description }}',
'{{ labels }}',
'{{ backupMinimumEnforcedRetentionDuration }}',
'{{ etag }}',
'{{ effectiveTime }}',
'{{ annotations }}',
'{{ accessRestriction }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backupVaultId }}',
'{{ requestId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the settings of a BackupVault.

UPDATE google.backupdr.backup_vaults
SET
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__backupMinimumEnforcedRetentionDuration = '{{ backupMinimumEnforcedRetentionDuration }}',
data__etag = '{{ etag }}',
data__effectiveTime = '{{ effectiveTime }}',
data__annotations = '{{ annotations }}',
data__accessRestriction = '{{ accessRestriction }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupVaultsId = '{{ backupVaultsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
AND validateOnly = {{ validateOnly}}
AND force = {{ force}}
AND forceUpdateAccessRestriction = {{ forceUpdateAccessRestriction}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a BackupVault.

DELETE FROM google.backupdr.backup_vaults
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupVaultsId = '{{ backupVaultsId }}' --required
AND requestId = '{{ requestId }}'
AND force = '{{ force }}'
AND etag = '{{ etag }}'
AND validateOnly = '{{ validateOnly }}'
AND allowMissing = '{{ allowMissing }}'
AND ignoreBackupPlanReferences = '{{ ignoreBackupPlanReferences }}';