backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | google.alloydb.backups |
Fields
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} |
description | string | User-provided description of the backup. |
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. |
createTime | string | 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 | Output only. Delete time stamp |
displayName | string | User-settable and human-readable display name for the Backup. |
encryptionConfig | object | EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key). |
encryptionInfo | object | EncryptionInfo describes the encryption information of a cluster or a backup. |
etag | string | For Resource freshness validation (https://google.aip.dev/154) |
expiryQuantity | object | A backup's position in a quantity-based retention queue, of backups with the same source cluster and type, with length, retention, specified by the backup's retention policy. Once the position is greater than the retention, the backup is eligible to be garbage collected. Example: 5 backups from the same source cluster and type with a quantity-based retention of 3 and denoted by backup_id (position, retention). Safe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3). Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3) |
expiryTime | string | 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 | Output only. The size of the backup in bytes. |
state | string | Output only. The current state of the backup. |
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 | Output only. Update time stamp |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | backupsId, locationsId, projectsId | Gets details of a single Backup. |
list | SELECT | locationsId, projectsId | Lists Backups in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new Backup in a given project and location. |
delete | DELETE | backupsId, locationsId, projectsId | Deletes a single Backup. |
patch | UPDATE | backupsId, locationsId, projectsId | Updates the parameters of a single Backup. |
SELECT
examples
Lists Backups in a given project and location.
SELECT
name,
description,
annotations,
clusterName,
clusterUid,
createTime,
databaseVersion,
deleteTime,
displayName,
encryptionConfig,
encryptionInfo,
etag,
expiryQuantity,
expiryTime,
labels,
reconciling,
satisfiesPzs,
sizeBytes,
state,
type,
uid,
updateTime
FROM google.alloydb.backups
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new backups
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.alloydb.backups (
locationsId,
projectsId,
displayName,
labels,
type,
description,
clusterName,
encryptionConfig,
etag,
annotations
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ labels }}',
'{{ type }}',
'{{ description }}',
'{{ clusterName }}',
'{{ encryptionConfig }}',
'{{ etag }}',
'{{ annotations }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: uid
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: deleteTime
value: string
- name: labels
value: object
- name: state
value: string
- name: type
value: string
- name: description
value: string
- name: clusterUid
value: string
- name: clusterName
value: string
- name: reconciling
value: boolean
- name: encryptionConfig
value:
- name: kmsKeyName
value: string
- name: encryptionInfo
value:
- name: encryptionType
value: string
- name: kmsKeyVersions
value:
- string
- name: etag
value: string
- name: annotations
value: object
- name: sizeBytes
value: string
- name: expiryTime
value: string
- name: expiryQuantity
value:
- name: retentionCount
value: integer
- name: totalRetentionCount
value: integer
- name: satisfiesPzs
value: boolean
- name: databaseVersion
value: string
UPDATE
example
Updates a backups
resource.
/*+ update */
UPDATE google.alloydb.backups
SET
displayName = '{{ displayName }}',
labels = '{{ labels }}',
type = '{{ type }}',
description = '{{ description }}',
clusterName = '{{ clusterName }}',
encryptionConfig = '{{ encryptionConfig }}',
etag = '{{ etag }}',
annotations = '{{ annotations }}'
WHERE
backupsId = '{{ backupsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified backups
resource.
/*+ delete */
DELETE FROM google.alloydb.backups
WHERE backupsId = '{{ backupsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';