REST Resource: projects.locations.restorePlans.restores

Resource: Restore

Represents both a request to Restore some portion of a Backup into a target GKE cluster and a record of the restore operation itself.

JSON representation
{
  "name": string,
  "uid": string,
  "createTime": string,
  "updateTime": string,
  "description": string,
  "backup": string,
  "cluster": string,
  "restoreConfig": {
    object (RestoreConfig)
  },
  "labels": {
    string: string,
    ...
  },
  "state": enum (State),
  "stateReason": string,
  "completeTime": string,
  "resourcesRestoredCount": integer,
  "resourcesExcludedCount": integer,
  "resourcesFailedCount": integer,
  "volumesRestoredCount": integer,
  "etag": string,
  "filter": {
    object (Filter)
  },
  "volumeDataRestorePolicyOverrides": [
    {
      object (VolumeDataRestorePolicyOverride)
    }
  ]
}
Fields
name

string

Output only. The full name of the Restore resource. Format: projects/*/locations/*/restorePlans/*/restores/*

uid

string

Output only. Server generated global unique identifier of UUID format.

createTime

string (Timestamp format)

Output only. The timestamp when this Restore resource was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The timestamp when this Restore resource was last updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

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 backupPlan. 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.

restoreConfig

object (RestoreConfig)

Output only. Configuration of the Restore. Inherited from parent RestorePlan's restoreConfig.

labels

map (key: string, value: string)

A set of custom labels supplied by user.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

state

enum (State)

Output only. The current state of the Restore.

stateReason

string

Output only. Human-readable description of why the Restore is in its current state.

completeTime

string (Timestamp format)

Output only. Timestamp of when the restore operation completed.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

resourcesRestoredCount

integer

Output only. Number of resources restored during the restore execution.

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.

volumesRestoredCount

integer

Output only. Number of volumes restored during the restore execution.

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 restores.get, and systems are expected to put that etag in the request to restores.patch or restores.delete to ensure that their change will be applied to the same version of the resource.

filter

object (Filter)

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 inclusionFilters or everyting is excluded by the exclusionFilters, nothing will be restored. This filter can only be specified if the value of namespacedResourceRestoreMode is set to MERGE_SKIP_ON_CONFLICT, MERGE_REPLACE_VOLUME_ON_CONFLICT or MERGE_REPLACE_ON_CONFLICT.

volumeDataRestorePolicyOverrides[]

object (VolumeDataRestorePolicyOverride)

Optional. Immutable. Overrides the volume data restore policies selected in the Restore Config for override-scoped resources.

State

Possible values for state of the Restore.

Enums
STATE_UNSPECIFIED The Restore resource is in the process of being created.
CREATING The Restore resource has been created and the associated RestoreJob Kubernetes resource has been injected into target cluster.
IN_PROGRESS The gkebackup agent in the cluster has begun executing the restore operation.
SUCCEEDED The restore operation has completed successfully. Restored workloads may not yet be operational.
FAILED The restore operation has failed.
DELETING This Restore resource is in the process of being deleted.

Filter

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. exclusionFilters take precedence over inclusionFilters. If a resource matches both inclusionFilters and exclusionFilters, it will not be restored.

JSON representation
{
  "inclusionFilters": [
    {
      object (ResourceSelector)
    }
  ],
  "exclusionFilters": [
    {
      object (ResourceSelector)
    }
  ]
}
Fields
inclusionFilters[]

object (ResourceSelector)

Optional. Selects resources for restoration. If specified, only resources which match inclusionFilters will be selected for restoration. A resource will be selected if it matches any ResourceSelector of the inclusionFilters.

exclusionFilters[]

object (ResourceSelector)

Optional. Excludes resources from restoration. If specified, a resource will not be restored if it matches any ResourceSelector of the exclusionFilters.

ResourceSelector

Defines a selector to identify a single or a group of resources. Conditions in the selector are optional, but at least one field should be set to a non-empty value. If a condition is not specified, no restrictions will be applied on that dimension. If more than one condition is specified, a resource will be selected if and only if all conditions are met.

JSON representation
{
  "groupKind": {
    object (GroupKind)
  },
  "name": string,
  "namespace": string,
  "labels": {
    string: string,
    ...
  }
}
Fields
groupKind

object (GroupKind)

Optional. Selects resources using their Kubernetes GroupKinds. If specified, only resources of provided GroupKind will be selected.

name

string

Optional. Selects resources using their resource names. If specified, only resources with the provided name will be selected.

namespace

string

Optional. Selects resources using their namespaces. This only applies to namespace scoped resources and cannot be used for selecting cluster scoped resources. If specified, only resources in the provided namespace will be selected. If not specified, the filter will apply to both cluster scoped and namespace scoped resources (e.g. name or label). The Namespace resource itself will be restored if and only if any resources within the namespace are restored.

labels

map (key: string, value: string)

Optional. Selects resources using Kubernetes labels. If specified, a resource will be selected if and only if the resource has all of the provided labels and all the label values match.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

VolumeDataRestorePolicyOverride

Defines an override to apply a VolumeDataRestorePolicy for scoped resources.

JSON representation
{
  "policy": enum (VolumeDataRestorePolicy),

  // Union field scope can be only one of the following:
  "selectedPvcs": {
    object (NamespacedNames)
  }
  // End of list of possible types for union field scope.
}
Fields
policy

enum (VolumeDataRestorePolicy)

Required. The VolumeDataRestorePolicy to apply when restoring volumes in scope.

Union field scope.

scope can be only one of the following:

selectedPvcs

object (NamespacedNames)

A list of PVCs to apply the policy override to.

Methods

create

Creates a new Restore for the given RestorePlan.

delete

Deletes an existing Restore.

get

Retrieves the details of a single Restore.

getIamPolicy

Gets the access control policy for a resource.

list

Lists the Restores for a given RestorePlan.

patch

Update a Restore.

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.