restores
Creates, updates, deletes, gets or lists a restores
resource.
Overview
Name | restores |
Type | Resource |
Id | google.gkebackup.restores |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The full name of the Restore resource. Format: projects/*/locations/*/restorePlans/*/restores/* |
description | string | User specified descriptive string for this Restore. |
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 | Output only. Timestamp of when the restore operation completed. |
createTime | string | Output only. The timestamp when this Restore resource was created. |
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 | Defines the filter for Restore . This filter can be used to further refine the resource selection of the Restore beyond the coarse-grained scope defined in the RestorePlan . exclusion_filters take precedence over inclusion_filters . If a resource matches both inclusion_filters and exclusion_filters , it will not be restored. |
labels | object | A set of custom labels supplied by user. |
resourcesExcludedCount | integer | Output only. Number of resources excluded during the restore execution. |
resourcesFailedCount | integer | Output only. Number of resources that failed to be restored during the restore execution. |
resourcesRestoredCount | integer | Output only. Number of resources restored during the restore execution. |
restoreConfig | object | Configuration of a restore. |
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. |
uid | string | Output only. Server generated global unique identifier of UUID format. |
updateTime | string | 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 | Output only. Number of volumes restored during the restore execution. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, restorePlansId, restoresId | Retrieves the details of a single Restore. |
list | SELECT | locationsId, projectsId, restorePlansId | Lists the Restores for a given RestorePlan. |
create | INSERT | locationsId, projectsId, restorePlansId | Creates a new Restore for the given RestorePlan. |
delete | DELETE | locationsId, projectsId, restorePlansId, restoresId | Deletes an existing Restore. |
patch | UPDATE | locationsId, projectsId, restorePlansId, restoresId | Update a Restore. |
SELECT
examples
Lists the Restores for a given RestorePlan.
SELECT
name,
description,
backup,
cluster,
completeTime,
createTime,
etag,
filter,
labels,
resourcesExcludedCount,
resourcesFailedCount,
resourcesRestoredCount,
restoreConfig,
state,
stateReason,
uid,
updateTime,
volumeDataRestorePolicyOverrides,
volumesRestoredCount
FROM google.gkebackup.restores
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND restorePlansId = '{{ restorePlansId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new restores
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.gkebackup.restores (
locationsId,
projectsId,
restorePlansId,
description,
backup,
labels,
filter,
volumeDataRestorePolicyOverrides
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ restorePlansId }}',
'{{ description }}',
'{{ backup }}',
'{{ labels }}',
'{{ filter }}',
'{{ volumeDataRestorePolicyOverrides }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: uid
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: description
value: string
- name: backup
value: string
- name: cluster
value: string
- name: restoreConfig
value:
- name: volumeDataRestorePolicy
value: string
- name: clusterResourceConflictPolicy
value: string
- name: namespacedResourceRestoreMode
value: string
- name: clusterResourceRestoreScope
value:
- name: selectedGroupKinds
value:
- - name: resourceGroup
value: string
- name: resourceKind
value: string
- name: excludedGroupKinds
value:
- - name: resourceGroup
value: string
- name: resourceKind
value: string
- name: allGroupKinds
value: boolean
- name: noGroupKinds
value: boolean
- name: allNamespaces
value: boolean
- name: selectedNamespaces
value:
- name: namespaces
value:
- string
- name: selectedApplications
value:
- name: namespacedNames
value:
- - name: namespace
value: string
- name: name
value: string
- name: noNamespaces
value: boolean
- name: substitutionRules
value:
- - name: targetNamespaces
value:
- string
- name: targetGroupKinds
value:
- - name: resourceGroup
value: string
- name: resourceKind
value: string
- name: targetJsonPath
value: string
- name: originalValuePattern
value: string
- name: newValue
value: string
- name: transformationRules
value:
- - name: fieldActions
value:
- - name: op
value: string
- name: fromPath
value: string
- name: path
value: string
- name: value
value: string
- name: resourceFilter
value:
- name: namespaces
value:
- string
- name: groupKinds
value:
- - name: resourceGroup
value: string
- name: resourceKind
value: string
- name: jsonPath
value: string
- name: description
value: string
- name: volumeDataRestorePolicyBindings
value:
- - name: policy
value: string
- name: volumeType
value: string
- name: restoreOrder
value:
- name: groupKindDependencies
value:
- - name: satisfying
value:
- name: resourceGroup
value: string
- name: resourceKind
value: string
- name: labels
value: object
- name: state
value: string
- name: stateReason
value: string
- name: completeTime
value: string
- name: resourcesRestoredCount
value: integer
- name: resourcesExcludedCount
value: integer
- name: resourcesFailedCount
value: integer
- name: volumesRestoredCount
value: integer
- name: etag
value: string
- name: filter
value:
- name: inclusionFilters
value:
- - name: name
value: string
- name: namespace
value: string
- name: labels
value: object
- name: exclusionFilters
value:
- - name: name
value: string
- name: namespace
value: string
- name: labels
value: object
- name: volumeDataRestorePolicyOverrides
value:
- - name: policy
value: string
UPDATE
example
Updates a restores
resource.
/*+ update */
UPDATE google.gkebackup.restores
SET
description = '{{ description }}',
backup = '{{ backup }}',
labels = '{{ labels }}',
filter = '{{ filter }}',
volumeDataRestorePolicyOverrides = '{{ volumeDataRestorePolicyOverrides }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND restorePlansId = '{{ restorePlansId }}'
AND restoresId = '{{ restoresId }}';
DELETE
example
Deletes the specified restores
resource.
/*+ delete */
DELETE FROM google.gkebackup.restores
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND restorePlansId = '{{ restorePlansId }}'
AND restoresId = '{{ restoresId }}';