Class: Google::Apis::GkebackupV1::RestoreConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/gkebackup_v1/classes.rb,
lib/google/apis/gkebackup_v1/representations.rb,
lib/google/apis/gkebackup_v1/representations.rb

Overview

Configuration of a restore.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RestoreConfig

Returns a new instance of RestoreConfig.



2606
2607
2608
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2606

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#all_namespacesBoolean Also known as: all_namespaces?

Restore all namespaced resources in the Backup if set to "True". Specifying this field to "False" is an error. Corresponds to the JSON property allNamespaces

Returns:

  • (Boolean)


2514
2515
2516
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2514

def all_namespaces
  @all_namespaces
end

#cluster_resource_conflict_policyString

Optional. Defines the behavior for handling the situation where cluster-scoped resources being restored already exist in the target cluster. This MUST be set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if cluster_resource_restore_scope is not empty. Corresponds to the JSON property clusterResourceConflictPolicy

Returns:

  • (String)


2523
2524
2525
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2523

def cluster_resource_conflict_policy
  @cluster_resource_conflict_policy
end

#cluster_resource_restore_scopeGoogle::Apis::GkebackupV1::ClusterResourceRestoreScope

Defines the scope of cluster-scoped resources to restore. Some group kinds are not reasonable choices for a restore, and will cause an error if selected here. Any scope selection that would restore "all valid" resources automatically excludes these group kinds. - Node - ComponentStatus - gkebackup.gke.io/ BackupJob - gkebackup.gke.io/RestoreJob - metrics.k8s.io/NodeMetrics - migration.k8s.io/StorageState - migration.k8s.io/StorageVersionMigration - snapshot.storage.k8s.io/VolumeSnapshotContent - storage.k8s.io/CSINode - storage.k8s.io/VolumeAttachment Some group kinds are driven by restore configuration elsewhere, and will cause an error if selected here. - Namespace

  • PersistentVolume Corresponds to the JSON property clusterResourceRestoreScope


2537
2538
2539
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2537

def cluster_resource_restore_scope
  @cluster_resource_restore_scope
end

#excluded_namespacesGoogle::Apis::GkebackupV1::Namespaces

A list of Kubernetes Namespaces. Corresponds to the JSON property excludedNamespaces



2542
2543
2544
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2542

def excluded_namespaces
  @excluded_namespaces
end

#namespaced_resource_restore_modeString

Optional. Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster. This MUST be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. Corresponds to the JSON property namespacedResourceRestoreMode

Returns:

  • (String)


2549
2550
2551
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2549

def namespaced_resource_restore_mode
  @namespaced_resource_restore_mode
end

#no_namespacesBoolean Also known as: no_namespaces?

Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed. Corresponds to the JSON property noNamespaces

Returns:

  • (Boolean)


2555
2556
2557
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2555

def no_namespaces
  @no_namespaces
end

#restore_orderGoogle::Apis::GkebackupV1::RestoreOrder

Allows customers to specify dependencies between resources that Backup for GKE can use to compute a resasonable restore order. Corresponds to the JSON property restoreOrder



2562
2563
2564
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2562

def restore_order
  @restore_order
end

#selected_applicationsGoogle::Apis::GkebackupV1::NamespacedNames

A list of namespaced Kubernetes resources. Corresponds to the JSON property selectedApplications



2567
2568
2569
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2567

def selected_applications
  @selected_applications
end

#selected_namespacesGoogle::Apis::GkebackupV1::Namespaces

A list of Kubernetes Namespaces. Corresponds to the JSON property selectedNamespaces



2572
2573
2574
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2572

def selected_namespaces
  @selected_namespaces
end

#substitution_rulesArray<Google::Apis::GkebackupV1::SubstitutionRule>

Optional. A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no substitution will occur. Corresponds to the JSON property substitutionRules



2581
2582
2583
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2581

def substitution_rules
  @substitution_rules
end

#transformation_rulesArray<Google::Apis::GkebackupV1::TransformationRule>

Optional. A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Corresponds to the JSON property transformationRules



2590
2591
2592
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2590

def transformation_rules
  @transformation_rules
end

#volume_data_restore_policyString

Optional. Specifies the mechanism to be used to restore volume data. Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as NO_VOLUME_DATA_RESTORATION). Corresponds to the JSON property volumeDataRestorePolicy

Returns:

  • (String)


2597
2598
2599
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2597

def volume_data_restore_policy
  @volume_data_restore_policy
end

#volume_data_restore_policy_bindingsArray<Google::Apis::GkebackupV1::VolumeDataRestorePolicyBinding>

Optional. A table that binds volumes by their scope to a restore policy. Bindings must have a unique scope. Any volumes not scoped in the bindings are subject to the policy defined in volume_data_restore_policy. Corresponds to the JSON property volumeDataRestorePolicyBindings



2604
2605
2606
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2604

def volume_data_restore_policy_bindings
  @volume_data_restore_policy_bindings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 2611

def update!(**args)
  @all_namespaces = args[:all_namespaces] if args.key?(:all_namespaces)
  @cluster_resource_conflict_policy = args[:cluster_resource_conflict_policy] if args.key?(:cluster_resource_conflict_policy)
  @cluster_resource_restore_scope = args[:cluster_resource_restore_scope] if args.key?(:cluster_resource_restore_scope)
  @excluded_namespaces = args[:excluded_namespaces] if args.key?(:excluded_namespaces)
  @namespaced_resource_restore_mode = args[:namespaced_resource_restore_mode] if args.key?(:namespaced_resource_restore_mode)
  @no_namespaces = args[:no_namespaces] if args.key?(:no_namespaces)
  @restore_order = args[:restore_order] if args.key?(:restore_order)
  @selected_applications = args[:selected_applications] if args.key?(:selected_applications)
  @selected_namespaces = args[:selected_namespaces] if args.key?(:selected_namespaces)
  @substitution_rules = args[:substitution_rules] if args.key?(:substitution_rules)
  @transformation_rules = args[:transformation_rules] if args.key?(:transformation_rules)
  @volume_data_restore_policy = args[:volume_data_restore_policy] if args.key?(:volume_data_restore_policy)
  @volume_data_restore_policy_bindings = args[:volume_data_restore_policy_bindings] if args.key?(:volume_data_restore_policy_bindings)
end