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
Successful response
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. 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. |
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. |
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. |
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 (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. |
Successful response
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. 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. |
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. |
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. |
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 (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 | pageSize , pageToken , filter , orderBy , view | Lists BackupVaults in a given project and location. |
create | insert | projectsId , locationsId | backupVaultId , requestId , validateOnly | Creates a new BackupVault in a given project and location. |
patch | update | projectsId , locationsId , backupVaultsId | updateMask , requestId , validateOnly , force , forceUpdateAccessRestriction | Updates the settings of a BackupVault. |
delete | delete | projectsId , locationsId , backupVaultsId | requestId , force , etag , validateOnly , allowMissing , ignoreBackupPlanReferences | 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,
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 }}';
Lists BackupVaults in a given project and location.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND view = '{{ view }}';
INSERT
examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: backup_vaults
props:
- name: projectsId
value: string
description: Required parameter for the backup_vaults resource.
- name: locationsId
value: string
description: Required parameter for the backup_vaults resource.
- name: description
value: string
description: >
Optional. The description of the BackupVault instance (2048 characters or less).
- name: labels
value: object
description: >
Optional. Resource labels to represent user provided metadata. No labels currently defined:
- name: backupMinimumEnforcedRetentionDuration
value: string
description: >
Required. The default and minimum enforced retention for each backup within the backup vault. The enforced retention for each backup can be extended.
- name: etag
value: string
description: >
Optional. Server specified ETag for the backup vault resource to prevent simultaneous updates from overwiting each other.
- name: effectiveTime
value: string
description: >
Optional. Time after which the BackupVault resource is locked.
- name: annotations
value: object
description: >
Optional. User annotations. See https://google.aip.dev/128#annotations Stores small amounts of arbitrary data.
- name: accessRestriction
value: string
description: >
Optional. 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.
valid_values: ['ACCESS_RESTRICTION_UNSPECIFIED', 'WITHIN_PROJECT', 'WITHIN_ORGANIZATION', 'UNRESTRICTED', 'WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA']
- name: backupVaultId
value: string
- name: requestId
value: string
- name: validateOnly
value: boolean
UPDATE
examples
- patch
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
- delete
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 }}';