restore_plans
Creates, updates, deletes, gets or lists a restore_plans
resource.
Overview
Name | restore_plans |
Type | Resource |
Id | google.gkebackup.restore_plans |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The full name of the RestorePlan resource. Format: projects/*/locations/*/restorePlans/* . |
backupPlan | string | Required. Immutable. A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan. Format: projects/*/locations/*/backupPlans/* . |
cluster | string | Required. Immutable. The target cluster into which Restores created via this RestorePlan will restore data. NOTE: the cluster's region must be the same as the RestorePlan. Valid formats: - projects/*/locations/*/clusters/* - projects/*/zones/*/clusters/* |
createTime | string (google-datetime) | Output only. The timestamp when this RestorePlan resource was created. |
description | string | Optional. User specified descriptive string for this RestorePlan. |
etag | string | Output only. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a restore from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform restore updates in order to avoid race conditions: An etag is returned in the response to GetRestorePlan , and systems are expected to put that etag in the request to UpdateRestorePlan or DeleteRestorePlan to ensure that their change will be applied to the same version of the resource. |
labels | object | Optional. A set of custom labels supplied by user. |
restoreChannel | string | Output only. The fully qualified name of the RestoreChannel to be used to create a RestorePlan. This field is set only if the backup_plan is in a different project than the RestorePlan. Format: projects/*/locations/*/restoreChannels/* |
restoreConfig | object | Required. Configuration of Restores created via this RestorePlan. (id: RestoreConfig) |
state | string | Output only. State of the RestorePlan. This State field reflects the various stages a RestorePlan can be in during the Create operation. |
stateReason | string | Output only. Human-readable description of why RestorePlan is in the current state . This field is only meant for human readability and should not be used programmatically as this field is not guaranteed to be consistent. |
uid | string | Output only. Server generated global unique identifier of UUID format. |
updateTime | string (google-datetime) | Output only. The timestamp when this RestorePlan resource was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The full name of the RestorePlan resource. Format: projects/*/locations/*/restorePlans/* . |
backupPlan | string | Required. Immutable. A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan. Format: projects/*/locations/*/backupPlans/* . |
cluster | string | Required. Immutable. The target cluster into which Restores created via this RestorePlan will restore data. NOTE: the cluster's region must be the same as the RestorePlan. Valid formats: - projects/*/locations/*/clusters/* - projects/*/zones/*/clusters/* |
createTime | string (google-datetime) | Output only. The timestamp when this RestorePlan resource was created. |
description | string | Optional. User specified descriptive string for this RestorePlan. |
etag | string | Output only. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a restore from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform restore updates in order to avoid race conditions: An etag is returned in the response to GetRestorePlan , and systems are expected to put that etag in the request to UpdateRestorePlan or DeleteRestorePlan to ensure that their change will be applied to the same version of the resource. |
labels | object | Optional. A set of custom labels supplied by user. |
restoreChannel | string | Output only. The fully qualified name of the RestoreChannel to be used to create a RestorePlan. This field is set only if the backup_plan is in a different project than the RestorePlan. Format: projects/*/locations/*/restoreChannels/* |
restoreConfig | object | Required. Configuration of Restores created via this RestorePlan. (id: RestoreConfig) |
state | string | Output only. State of the RestorePlan. This State field reflects the various stages a RestorePlan can be in during the Create operation. |
stateReason | string | Output only. Human-readable description of why RestorePlan is in the current state . This field is only meant for human readability and should not be used programmatically as this field is not guaranteed to be consistent. |
uid | string | Output only. Server generated global unique identifier of UUID format. |
updateTime | string (google-datetime) | Output only. The timestamp when this RestorePlan resource was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , restorePlansId | Retrieve the details of a single RestorePlan. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists RestorePlans in a given location. |
create | insert | projectsId , locationsId | restorePlanId | Creates a new RestorePlan in a given location. |
patch | update | projectsId , locationsId , restorePlansId | updateMask | Update a RestorePlan. |
delete | delete | projectsId , locationsId , restorePlansId | etag , force | Deletes an existing RestorePlan. |
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 |
---|---|---|
locationsId | string | |
projectsId | string | |
restorePlansId | string | |
etag | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
restorePlanId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Retrieve the details of a single RestorePlan.
SELECT
name,
backupPlan,
cluster,
createTime,
description,
etag,
labels,
restoreChannel,
restoreConfig,
state,
stateReason,
uid,
updateTime
FROM google.gkebackup.restore_plans
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND restorePlansId = '{{ restorePlansId }}' -- required;
Lists RestorePlans in a given location.
SELECT
name,
backupPlan,
cluster,
createTime,
description,
etag,
labels,
restoreChannel,
restoreConfig,
state,
stateReason,
uid,
updateTime
FROM google.gkebackup.restore_plans
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 RestorePlan in a given location.
INSERT INTO google.gkebackup.restore_plans (
data__description,
data__backupPlan,
data__cluster,
data__restoreConfig,
data__labels,
projectsId,
locationsId,
restorePlanId
)
SELECT
'{{ description }}',
'{{ backupPlan }}',
'{{ cluster }}',
'{{ restoreConfig }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ restorePlanId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: restore_plans
props:
- name: projectsId
value: string
description: Required parameter for the restore_plans resource.
- name: locationsId
value: string
description: Required parameter for the restore_plans resource.
- name: description
value: string
description: >
Optional. User specified descriptive string for this RestorePlan.
- name: backupPlan
value: string
description: >
Required. Immutable. A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan. Format: `projects/*/locations/*/backupPlans/*`.
- name: cluster
value: string
description: >
Required. Immutable. The target cluster into which Restores created via this RestorePlan will restore data. NOTE: the cluster's region must be the same as the RestorePlan. Valid formats: - `projects/*/locations/*/clusters/*` - `projects/*/zones/*/clusters/*`
- name: restoreConfig
value: object
description: >
Required. Configuration of Restores created via this RestorePlan.
- name: labels
value: object
description: >
Optional. A set of custom labels supplied by user.
- name: restorePlanId
value: string
UPDATE
examples
- patch
Update a RestorePlan.
UPDATE google.gkebackup.restore_plans
SET
data__description = '{{ description }}',
data__backupPlan = '{{ backupPlan }}',
data__cluster = '{{ cluster }}',
data__restoreConfig = '{{ restoreConfig }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND restorePlansId = '{{ restorePlansId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes an existing RestorePlan.
DELETE FROM google.gkebackup.restore_plans
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND restorePlansId = '{{ restorePlansId }}' --required
AND etag = '{{ etag }}'
AND force = '{{ force }}';