backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | google.alloydb.backups |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression [a-z]([a-z0-9-]{0,61}[a-z0-9])? , e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region} |
annotations | object | Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 |
clusterName | string | Required. The full resource name of the backup source cluster (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}). |
clusterUid | string | Output only. The system-generated UID of the cluster which was used to create this resource. |
createCompletionTime | string (google-datetime) | Output only. Timestamp when the resource finished being created. |
createTime | string (google-datetime) | Output only. Create time stamp |
databaseVersion | string | Output only. The database engine major version of the cluster this backup was created from. Any restored cluster created from this backup will have the same database version. |
deleteTime | string (google-datetime) | Output only. Delete time stamp |
description | string | User-provided description of the backup. |
displayName | string | User-settable and human-readable display name for the Backup. |
encryptionConfig | object | Optional. The encryption config can be specified to encrypt the backup with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data. (id: EncryptionConfig) |
encryptionInfo | object | Output only. The encryption information for the backup. (id: EncryptionInfo) |
etag | string | For Resource freshness validation (https://google.aip.dev/154) |
expiryQuantity | object | Output only. The QuantityBasedExpiry of the backup, specified by the backup's retention policy. Once the expiry quantity is over retention, the backup is eligible to be garbage collected. (id: QuantityBasedExpiry) |
expiryTime | string (google-datetime) | Output only. The time at which after the backup is eligible to be garbage collected. It is the duration specified by the backup's retention policy, added to the backup's create_time. |
labels | object | Labels as key value pairs |
reconciling | boolean | Output only. Reconciling (https://google.aip.dev/128#reconciliation), if true, indicates that the service is actively updating the resource. This can happen due to user-triggered updates or system actions like failover or maintenance. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
sizeBytes | string (int64) | Output only. The size of the backup in bytes. |
state | string | Output only. The current state of the backup. |
tags | object | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" |
type | string | The backup type, which suggests the trigger for the backup. |
uid | string | Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted. |
updateTime | string (google-datetime) | Output only. Update time stamp Users should not infer any meaning from this field. Its value is generally unrelated to the timing of the backup creation operation. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression [a-z]([a-z0-9-]{0,61}[a-z0-9])? , e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region} |
annotations | object | Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 |
clusterName | string | Required. The full resource name of the backup source cluster (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}). |
clusterUid | string | Output only. The system-generated UID of the cluster which was used to create this resource. |
createCompletionTime | string (google-datetime) | Output only. Timestamp when the resource finished being created. |
createTime | string (google-datetime) | Output only. Create time stamp |
databaseVersion | string | Output only. The database engine major version of the cluster this backup was created from. Any restored cluster created from this backup will have the same database version. |
deleteTime | string (google-datetime) | Output only. Delete time stamp |
description | string | User-provided description of the backup. |
displayName | string | User-settable and human-readable display name for the Backup. |
encryptionConfig | object | Optional. The encryption config can be specified to encrypt the backup with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data. (id: EncryptionConfig) |
encryptionInfo | object | Output only. The encryption information for the backup. (id: EncryptionInfo) |
etag | string | For Resource freshness validation (https://google.aip.dev/154) |
expiryQuantity | object | Output only. The QuantityBasedExpiry of the backup, specified by the backup's retention policy. Once the expiry quantity is over retention, the backup is eligible to be garbage collected. (id: QuantityBasedExpiry) |
expiryTime | string (google-datetime) | Output only. The time at which after the backup is eligible to be garbage collected. It is the duration specified by the backup's retention policy, added to the backup's create_time. |
labels | object | Labels as key value pairs |
reconciling | boolean | Output only. Reconciling (https://google.aip.dev/128#reconciliation), if true, indicates that the service is actively updating the resource. This can happen due to user-triggered updates or system actions like failover or maintenance. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
sizeBytes | string (int64) | Output only. The size of the backup in bytes. |
state | string | Output only. The current state of the backup. |
tags | object | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" |
type | string | The backup type, which suggests the trigger for the backup. |
uid | string | Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted. |
updateTime | string (google-datetime) | Output only. Update time stamp Users should not infer any meaning from this field. Its value is generally unrelated to the timing of the backup creation operation. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , backupsId | Gets details of a single Backup. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists Backups in a given project and location. |
create | insert | projectsId , locationsId | backupId , requestId , validateOnly | Creates a new Backup in a given project and location. |
patch | update | projectsId , locationsId , backupsId | updateMask , requestId , validateOnly , allowMissing | Updates the parameters of a single Backup. |
delete | delete | projectsId , locationsId , backupsId | requestId , validateOnly , etag | Deletes a single Backup. |
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 |
---|---|---|
backupsId | string | |
locationsId | string | |
projectsId | string | |
allowMissing | boolean | |
backupId | string | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT
examples
- get
- list
Gets details of a single Backup.
SELECT
name,
annotations,
clusterName,
clusterUid,
createCompletionTime,
createTime,
databaseVersion,
deleteTime,
description,
displayName,
encryptionConfig,
encryptionInfo,
etag,
expiryQuantity,
expiryTime,
labels,
reconciling,
satisfiesPzs,
sizeBytes,
state,
tags,
type,
uid,
updateTime
FROM google.alloydb.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupsId = '{{ backupsId }}' -- required;
Lists Backups in a given project and location.
SELECT
name,
annotations,
clusterName,
clusterUid,
createCompletionTime,
createTime,
databaseVersion,
deleteTime,
description,
displayName,
encryptionConfig,
encryptionInfo,
etag,
expiryQuantity,
expiryTime,
labels,
reconciling,
satisfiesPzs,
sizeBytes,
state,
tags,
type,
uid,
updateTime
FROM google.alloydb.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new Backup in a given project and location.
INSERT INTO google.alloydb.backups (
data__displayName,
data__labels,
data__type,
data__description,
data__clusterName,
data__encryptionConfig,
data__etag,
data__annotations,
data__tags,
projectsId,
locationsId,
backupId,
requestId,
validateOnly
)
SELECT
'{{ displayName }}',
'{{ labels }}',
'{{ type }}',
'{{ description }}',
'{{ clusterName }}',
'{{ encryptionConfig }}',
'{{ etag }}',
'{{ annotations }}',
'{{ tags }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backupId }}',
'{{ requestId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: backups
props:
- name: projectsId
value: string
description: Required parameter for the backups resource.
- name: locationsId
value: string
description: Required parameter for the backups resource.
- name: displayName
value: string
description: >
User-settable and human-readable display name for the Backup.
- name: labels
value: object
description: >
Labels as key value pairs
- name: type
value: string
description: >
The backup type, which suggests the trigger for the backup.
valid_values: ['TYPE_UNSPECIFIED', 'ON_DEMAND', 'AUTOMATED', 'CONTINUOUS']
- name: description
value: string
description: >
User-provided description of the backup.
- name: clusterName
value: string
description: >
Required. The full resource name of the backup source cluster (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}).
- name: encryptionConfig
value: object
description: >
Optional. The encryption config can be specified to encrypt the backup with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data.
- name: etag
value: string
description: >
For Resource freshness validation (https://google.aip.dev/154)
- name: annotations
value: object
description: >
Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128
- name: tags
value: object
description: >
Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: ``` "123/environment": "production", "123/costCenter": "marketing" ```
- name: backupId
value: string
- name: requestId
value: string
- name: validateOnly
value: boolean
UPDATE
examples
- patch
Updates the parameters of a single Backup.
UPDATE google.alloydb.backups
SET
data__displayName = '{{ displayName }}',
data__labels = '{{ labels }}',
data__type = '{{ type }}',
data__description = '{{ description }}',
data__clusterName = '{{ clusterName }}',
data__encryptionConfig = '{{ encryptionConfig }}',
data__etag = '{{ etag }}',
data__annotations = '{{ annotations }}',
data__tags = '{{ tags }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupsId = '{{ backupsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
AND validateOnly = {{ validateOnly}}
AND allowMissing = {{ allowMissing}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a single Backup.
DELETE FROM google.alloydb.backups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupsId = '{{ backupsId }}' --required
AND requestId = '{{ requestId }}'
AND validateOnly = '{{ validateOnly }}'
AND etag = '{{ etag }}';