restores
Creates, updates, deletes, gets or lists a restores
resource.
Overview
Name | restores |
Type | Resource |
Id | google.gkebackup.restores |
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 Restore resource. Format: projects/*/locations/*/restorePlans/*/restores/* |
backup | string | Required. Immutable. A reference to the Backup used as the source from which this Restore will restore. Note that this Backup must be a sub-resource of the RestorePlan's backup_plan. Format: projects/*/locations/*/backupPlans/*/backups/* . |
cluster | string | Output only. The target cluster into which this Restore will restore data. Valid formats: - projects/*/locations/*/clusters/* - projects/*/zones/*/clusters/* Inherited from parent RestorePlan's cluster value. |
completeTime | string (google-datetime) | Output only. Timestamp of when the restore operation completed. |
createTime | string (google-datetime) | Output only. The timestamp when this Restore resource was created. |
description | string | Optional. User specified descriptive string for this Restore. |
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 GetRestore , and systems are expected to put that etag in the request to UpdateRestore or DeleteRestore to ensure that their change will be applied to the same version of the resource. |
filter | object | Optional. Immutable. Filters resources for Restore . If not specified, the scope of the restore will remain the same as defined in the RestorePlan . If this is specified and no resources are matched by the inclusion_filters or everything is excluded by the exclusion_filters , nothing will be restored. This filter can only be specified if the value of namespaced_resource_restore_mode is set to MERGE_SKIP_ON_CONFLICT , MERGE_REPLACE_VOLUME_ON_CONFLICT or MERGE_REPLACE_ON_CONFLICT . (id: Filter) |
labels | object | A set of custom labels supplied by user. |
resourcesExcludedCount | integer (int32) | Output only. Number of resources excluded during the restore execution. |
resourcesFailedCount | integer (int32) | Output only. Number of resources that failed to be restored during the restore execution. |
resourcesRestoredCount | integer (int32) | Output only. Number of resources restored during the restore execution. |
restoreConfig | object | Output only. Configuration of the Restore. Inherited from parent RestorePlan's restore_config. (id: RestoreConfig) |
state | string | Output only. The current state of the Restore. |
stateReason | string | Output only. Human-readable description of why the Restore is in its 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. |
troubleshootingInfo | object | Output only. Information about the troubleshooting steps which will provide debugging information to the end users. (id: TroubleshootingInfo) |
uid | string | Output only. Server generated global unique identifier of UUID format. |
updateTime | string (google-datetime) | Output only. The timestamp when this Restore resource was last updated. |
volumeDataRestorePolicyOverrides | array | Optional. Immutable. Overrides the volume data restore policies selected in the Restore Config for override-scoped resources. |
volumesRestoredCount | integer (int32) | Output only. Number of volumes restored during the restore execution. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The full name of the Restore resource. Format: projects/*/locations/*/restorePlans/*/restores/* |
backup | string | Required. Immutable. A reference to the Backup used as the source from which this Restore will restore. Note that this Backup must be a sub-resource of the RestorePlan's backup_plan. Format: projects/*/locations/*/backupPlans/*/backups/* . |
cluster | string | Output only. The target cluster into which this Restore will restore data. Valid formats: - projects/*/locations/*/clusters/* - projects/*/zones/*/clusters/* Inherited from parent RestorePlan's cluster value. |
completeTime | string (google-datetime) | Output only. Timestamp of when the restore operation completed. |
createTime | string (google-datetime) | Output only. The timestamp when this Restore resource was created. |
description | string | Optional. User specified descriptive string for this Restore. |
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 GetRestore , and systems are expected to put that etag in the request to UpdateRestore or DeleteRestore to ensure that their change will be applied to the same version of the resource. |
filter | object | Optional. Immutable. Filters resources for Restore . If not specified, the scope of the restore will remain the same as defined in the RestorePlan . If this is specified and no resources are matched by the inclusion_filters or everything is excluded by the exclusion_filters , nothing will be restored. This filter can only be specified if the value of namespaced_resource_restore_mode is set to MERGE_SKIP_ON_CONFLICT , MERGE_REPLACE_VOLUME_ON_CONFLICT or MERGE_REPLACE_ON_CONFLICT . (id: Filter) |
labels | object | A set of custom labels supplied by user. |
resourcesExcludedCount | integer (int32) | Output only. Number of resources excluded during the restore execution. |
resourcesFailedCount | integer (int32) | Output only. Number of resources that failed to be restored during the restore execution. |
resourcesRestoredCount | integer (int32) | Output only. Number of resources restored during the restore execution. |
restoreConfig | object | Output only. Configuration of the Restore. Inherited from parent RestorePlan's restore_config. (id: RestoreConfig) |
state | string | Output only. The current state of the Restore. |
stateReason | string | Output only. Human-readable description of why the Restore is in its 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. |
troubleshootingInfo | object | Output only. Information about the troubleshooting steps which will provide debugging information to the end users. (id: TroubleshootingInfo) |
uid | string | Output only. Server generated global unique identifier of UUID format. |
updateTime | string (google-datetime) | Output only. The timestamp when this Restore resource was last updated. |
volumeDataRestorePolicyOverrides | array | Optional. Immutable. Overrides the volume data restore policies selected in the Restore Config for override-scoped resources. |
volumesRestoredCount | integer (int32) | Output only. Number of volumes restored during the restore execution. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , restorePlansId , restoresId | Retrieves the details of a single Restore. | |
list | select | projectsId , locationsId , restorePlansId | pageSize , pageToken , filter , orderBy | Lists the Restores for a given RestorePlan. |
create | insert | projectsId , locationsId , restorePlansId | restoreId | Creates a new Restore for the given RestorePlan. |
patch | update | projectsId , locationsId , restorePlansId , restoresId | updateMask | Update a Restore. |
delete | delete | projectsId , locationsId , restorePlansId , restoresId | etag , force | Deletes an existing Restore. |
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 | |
restoresId | string | |
etag | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
restoreId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Retrieves the details of a single Restore.
SELECT
name,
backup,
cluster,
completeTime,
createTime,
description,
etag,
filter,
labels,
resourcesExcludedCount,
resourcesFailedCount,
resourcesRestoredCount,
restoreConfig,
state,
stateReason,
troubleshootingInfo,
uid,
updateTime,
volumeDataRestorePolicyOverrides,
volumesRestoredCount
FROM google.gkebackup.restores
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND restorePlansId = '{{ restorePlansId }}' -- required
AND restoresId = '{{ restoresId }}' -- required;
Lists the Restores for a given RestorePlan.
SELECT
name,
backup,
cluster,
completeTime,
createTime,
description,
etag,
filter,
labels,
resourcesExcludedCount,
resourcesFailedCount,
resourcesRestoredCount,
restoreConfig,
state,
stateReason,
troubleshootingInfo,
uid,
updateTime,
volumeDataRestorePolicyOverrides,
volumesRestoredCount
FROM google.gkebackup.restores
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND restorePlansId = '{{ restorePlansId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new Restore for the given RestorePlan.
INSERT INTO google.gkebackup.restores (
data__description,
data__backup,
data__labels,
data__filter,
data__volumeDataRestorePolicyOverrides,
projectsId,
locationsId,
restorePlansId,
restoreId
)
SELECT
'{{ description }}',
'{{ backup }}',
'{{ labels }}',
'{{ filter }}',
'{{ volumeDataRestorePolicyOverrides }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ restorePlansId }}',
'{{ restoreId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: restores
props:
- name: projectsId
value: string
description: Required parameter for the restores resource.
- name: locationsId
value: string
description: Required parameter for the restores resource.
- name: restorePlansId
value: string
description: Required parameter for the restores resource.
- name: description
value: string
description: >
Optional. User specified descriptive string for this Restore.
- name: backup
value: string
description: >
Required. Immutable. A reference to the Backup used as the source from which this Restore will restore. Note that this Backup must be a sub-resource of the RestorePlan's backup_plan. Format: `projects/*/locations/*/backupPlans/*/backups/*`.
- name: labels
value: object
description: >
A set of custom labels supplied by user.
- name: filter
value: object
description: >
Optional. Immutable. Filters resources for `Restore`. If not specified, the scope of the restore will remain the same as defined in the `RestorePlan`. If this is specified and no resources are matched by the `inclusion_filters` or everything is excluded by the `exclusion_filters`, nothing will be restored. This filter can only be specified if the value of namespaced_resource_restore_mode is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or `MERGE_REPLACE_ON_CONFLICT`.
- name: volumeDataRestorePolicyOverrides
value: array
description: >
Optional. Immutable. Overrides the volume data restore policies selected in the Restore Config for override-scoped resources.
- name: restoreId
value: string
UPDATE
examples
- patch
Update a Restore.
UPDATE google.gkebackup.restores
SET
data__description = '{{ description }}',
data__backup = '{{ backup }}',
data__labels = '{{ labels }}',
data__filter = '{{ filter }}',
data__volumeDataRestorePolicyOverrides = '{{ volumeDataRestorePolicyOverrides }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND restorePlansId = '{{ restorePlansId }}' --required
AND restoresId = '{{ restoresId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes an existing Restore.
DELETE FROM google.gkebackup.restores
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND restorePlansId = '{{ restorePlansId }}' --required
AND restoresId = '{{ restoresId }}' --required
AND etag = '{{ etag }}'
AND force = '{{ force }}';