backup_vaults
Creates, updates, deletes, gets or lists a backup_vaults resource.
Overview
| Name | backup_vaults |
| Type | Resource |
| Id | google.backupdr.backup_vaults |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output 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. |
accessRestriction | string | Optional. Restricts access to certain sources and destinations for data being sent into, or restored from, the backup vault. Defaults to WITHIN_ORGANIZATION if not provided during creation. (ACCESS_RESTRICTION_UNSPECIFIED, WITHIN_PROJECT, WITHIN_ORGANIZATION, UNRESTRICTED, WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA) |
annotations | object | Optional. User annotations. See https://google.aip.dev/128#annotations Stores small amounts of arbitrary data. |
backupCount | string (int64) | Output only. The number of backups in this backup vault. |
backupMinimumEnforcedRetentionDuration | string (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. Note: Longer minimum enforced retention period impacts potential storage costs post introductory trial. We recommend starting with a short duration of 3 days or less. |
backupRetentionInheritance | string | Optional. Setting for how a backup's enforced retention end time is inherited. (BACKUP_RETENTION_INHERITANCE_UNSPECIFIED, INHERIT_VAULT_RETENTION, MATCH_BACKUP_EXPIRE_TIME) |
createTime | string (google-datetime) | Output only. The time when the instance was created. |
deletable | boolean | Output only. Set to true when there are no backups nested under this resource. |
description | string | Optional. The description of the BackupVault instance (2048 characters or less). |
effectiveTime | string (google-datetime) | Optional. Time after which the BackupVault resource is locked. |
encryptionConfig | object | Optional. The encryption config of the backup vault. (id: EncryptionConfig) |
etag | string | Optional. Server specified ETag for the backup vault resource to prevent simultaneous updates from overwiting each other. |
labels | object | Optional. Resource labels to represent user provided metadata. No labels currently defined: |
serviceAccount | string | Output 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. |
state | string | Output only. The BackupVault resource instance state. (STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING, ERROR, UPDATING) |
totalStoredBytes | string (int64) | Output only. Total size of the storage used by all backup resources. |
uid | string | Output only. Immutable after resource creation until resource deletion. |
updateTime | string (google-datetime) | Output only. The time when the instance was updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Output 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. |
accessRestriction | string | Optional. Restricts access to certain sources and destinations for data being sent into, or restored from, the backup vault. Defaults to WITHIN_ORGANIZATION if not provided during creation. (ACCESS_RESTRICTION_UNSPECIFIED, WITHIN_PROJECT, WITHIN_ORGANIZATION, UNRESTRICTED, WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA) |
annotations | object | Optional. User annotations. See https://google.aip.dev/128#annotations Stores small amounts of arbitrary data. |
backupCount | string (int64) | Output only. The number of backups in this backup vault. |
backupMinimumEnforcedRetentionDuration | string (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. Note: Longer minimum enforced retention period impacts potential storage costs post introductory trial. We recommend starting with a short duration of 3 days or less. |
backupRetentionInheritance | string | Optional. Setting for how a backup's enforced retention end time is inherited. (BACKUP_RETENTION_INHERITANCE_UNSPECIFIED, INHERIT_VAULT_RETENTION, MATCH_BACKUP_EXPIRE_TIME) |
createTime | string (google-datetime) | Output only. The time when the instance was created. |
deletable | boolean | Output only. Set to true when there are no backups nested under this resource. |
description | string | Optional. The description of the BackupVault instance (2048 characters or less). |
effectiveTime | string (google-datetime) | Optional. Time after which the BackupVault resource is locked. |
encryptionConfig | object | Optional. The encryption config of the backup vault. (id: EncryptionConfig) |
etag | string | Optional. Server specified ETag for the backup vault resource to prevent simultaneous updates from overwiting each other. |
labels | object | Optional. Resource labels to represent user provided metadata. No labels currently defined: |
serviceAccount | string | Output 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. |
state | string | Output only. The BackupVault resource instance state. (STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING, ERROR, UPDATING) |
totalStoredBytes | string (int64) | Output only. Total size of the storage used by all backup resources. |
uid | string | Output only. Immutable after resource creation until resource deletion. |
updateTime | string (google-datetime) | Output only. The time when the instance was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, backupVaultsId | view | Gets details of a BackupVault. |
list | select | projectsId, locationsId | orderBy, view, pageToken, filter, pageSize | Lists BackupVaults in a given project and location. |
create | insert | projectsId, locationsId | validateOnly, backupVaultId, requestId | Creates a new BackupVault in a given project and location. |
patch | update | projectsId, locationsId, backupVaultsId | force, forceUpdateAccessRestriction, updateMask, requestId, validateOnly | Updates the settings of a BackupVault. |
delete | delete | projectsId, locationsId, backupVaultsId | etag, allowMissing, validateOnly, force, ignoreBackupPlanReferences, requestId | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
backupVaultsId | string | |
locationsId | string | |
projectsId | string | |
allowMissing | boolean | |
backupVaultId | string | |
etag | string | |
filter | string | |
force | boolean | |
forceUpdateAccessRestriction | boolean | |
ignoreBackupPlanReferences | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean | |
view | string |
SELECT examples
- get
- list
Gets details of a BackupVault.
SELECT
name,
accessRestriction,
annotations,
backupCount,
backupMinimumEnforcedRetentionDuration,
backupRetentionInheritance,
createTime,
deletable,
description,
effectiveTime,
encryptionConfig,
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 }}'
;
Lists BackupVaults in a given project and location.
SELECT
name,
accessRestriction,
annotations,
backupCount,
backupMinimumEnforcedRetentionDuration,
backupRetentionInheritance,
createTime,
deletable,
description,
effectiveTime,
encryptionConfig,
etag,
labels,
serviceAccount,
state,
totalStoredBytes,
uid,
updateTime
FROM google.backupdr.backup_vaults
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND orderBy = '{{ orderBy }}'
AND view = '{{ view }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- create
- Manifest
Creates a new BackupVault in a given project and location.
INSERT INTO google.backupdr.backup_vaults (
data__encryptionConfig,
data__effectiveTime,
data__labels,
data__annotations,
data__description,
data__etag,
data__backupMinimumEnforcedRetentionDuration,
data__backupRetentionInheritance,
data__accessRestriction,
projectsId,
locationsId,
validateOnly,
backupVaultId,
requestId
)
SELECT
'{{ encryptionConfig }}',
'{{ effectiveTime }}',
'{{ labels }}',
'{{ annotations }}',
'{{ description }}',
'{{ etag }}',
'{{ backupMinimumEnforcedRetentionDuration }}',
'{{ backupRetentionInheritance }}',
'{{ accessRestriction }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ validateOnly }}',
'{{ backupVaultId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: backup_vaults
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the backup_vaults resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the backup_vaults resource.
- name: encryptionConfig
description: |
Optional. The encryption config of the backup vault.
value:
kmsKeyName: "{{ kmsKeyName }}"
- name: effectiveTime
value: "{{ effectiveTime }}"
description: |
Optional. Time after which the BackupVault resource is locked.
- name: labels
value: "{{ labels }}"
description: |
Optional. Resource labels to represent user provided metadata. No labels currently defined:
- name: annotations
value: "{{ annotations }}"
description: |
Optional. User annotations. See https://google.aip.dev/128#annotations Stores small amounts of arbitrary data.
- name: description
value: "{{ description }}"
description: |
Optional. The description of the BackupVault instance (2048 characters or less).
- name: etag
value: "{{ etag }}"
description: |
Optional. Server specified ETag for the backup vault resource to prevent simultaneous updates from overwiting each other.
- name: backupMinimumEnforcedRetentionDuration
value: "{{ backupMinimumEnforcedRetentionDuration }}"
description: |
Required. The default and minimum enforced retention for each backup within the backup vault. The enforced retention for each backup can be extended. Note: Longer minimum enforced retention period impacts potential storage costs post introductory trial. We recommend starting with a short duration of 3 days or less.
- name: backupRetentionInheritance
value: "{{ backupRetentionInheritance }}"
description: |
Optional. Setting for how a backup's enforced retention end time is inherited.
valid_values: ['BACKUP_RETENTION_INHERITANCE_UNSPECIFIED', 'INHERIT_VAULT_RETENTION', 'MATCH_BACKUP_EXPIRE_TIME']
- name: accessRestriction
value: "{{ accessRestriction }}"
description: |
Optional. Restricts access to certain sources and destinations for data being sent into, or restored from, the backup vault. Defaults to WITHIN_ORGANIZATION if not provided during creation.
valid_values: ['ACCESS_RESTRICTION_UNSPECIFIED', 'WITHIN_PROJECT', 'WITHIN_ORGANIZATION', 'UNRESTRICTED', 'WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA']
- name: validateOnly
value: {{ validateOnly }}
- name: backupVaultId
value: "{{ backupVaultId }}"
- name: requestId
value: "{{ requestId }}"
UPDATE examples
- patch
Updates the settings of a BackupVault.
UPDATE google.backupdr.backup_vaults
SET
data__encryptionConfig = '{{ encryptionConfig }}',
data__effectiveTime = '{{ effectiveTime }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}',
data__description = '{{ description }}',
data__etag = '{{ etag }}',
data__backupMinimumEnforcedRetentionDuration = '{{ backupMinimumEnforcedRetentionDuration }}',
data__backupRetentionInheritance = '{{ backupRetentionInheritance }}',
data__accessRestriction = '{{ accessRestriction }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupVaultsId = '{{ backupVaultsId }}' --required
AND force = {{ force}}
AND forceUpdateAccessRestriction = {{ forceUpdateAccessRestriction}}
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a BackupVault.
DELETE FROM google.backupdr.backup_vaults
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupVaultsId = '{{ backupVaultsId }}' --required
AND etag = '{{ etag }}'
AND allowMissing = '{{ allowMissing }}'
AND validateOnly = '{{ validateOnly }}'
AND force = '{{ force }}'
AND ignoreBackupPlanReferences = '{{ ignoreBackupPlanReferences }}'
AND requestId = '{{ requestId }}'
;