backup_vaults
Creates, updates, deletes, gets or lists a backup_vaults
resource.
Overview
Name | backup_vaults |
Type | Resource |
Id | google.backupdr.backup_vaults |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. The resource name. |
description | string | Optional. The description of the BackupVault instance (2048 characters or less). |
annotations | object | Optional. User annotations. See https://google.aip.dev/128#annotations Stores small amounts of arbitrary data. |
backupCount | string | Output only. The number of backups in this backup vault. |
backupMinimumEnforcedRetentionDuration | string | Required. The default and minimum enforced retention for each backup within the backup vault. The enforced retention for each backup can be extended. |
createTime | string | 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. |
effectiveTime | string | Optional. Time after which the BackupVault resource is locked. |
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. |
totalStoredBytes | string | Output only. Total size of the storage used by all backup resources. |
uid | string | Output only. Output only Immutable after resource creation until resource deletion. |
updateTime | string | Output only. The time when the instance was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | backupVaultsId, locationsId, projectsId | Gets details of a BackupVault. |
list | SELECT | locationsId, projectsId | Lists BackupVaults in a given project and location. |
create | INSERT | locationsId, projectsId | |
delete | DELETE | backupVaultsId, locationsId, projectsId | Deletes a BackupVault. |
patch | UPDATE | backupVaultsId, locationsId, projectsId | Updates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.backupdr.backup_vaults (
locationsId,
projectsId,
description,
labels,
backupMinimumEnforcedRetentionDuration,
etag,
effectiveTime,
annotations
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ description }}',
'{{ labels }}',
'{{ backupMinimumEnforcedRetentionDuration }}',
'{{ etag }}',
'{{ effectiveTime }}',
'{{ annotations }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: description
value: string
- name: labels
value: object
- name: createTime
value: string
- name: updateTime
value: string
- name: backupMinimumEnforcedRetentionDuration
value: string
- name: deletable
value: boolean
- name: etag
value: string
- name: state
value: string
- name: effectiveTime
value: string
- name: backupCount
value: string
- name: serviceAccount
value: string
- name: totalStoredBytes
value: string
- name: uid
value: string
- name: annotations
value: object
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 }}';