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. Next id: 9

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RestoreConfig

Returns a new instance of RestoreConfig.



1525
1526
1527
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1525

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)


1476
1477
1478
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1476

def all_namespaces
  @all_namespaces
end

#cluster_resource_conflict_policyString

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)


1485
1486
1487
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1485

def cluster_resource_conflict_policy
  @cluster_resource_conflict_policy
end

#cluster_resource_restore_scopeGoogle::Apis::GkebackupV1::ClusterResourceRestoreScope

Identifies the cluster-scoped resources to restore from the Backup. Corresponds to the JSON property clusterResourceRestoreScope



1490
1491
1492
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1490

def cluster_resource_restore_scope
  @cluster_resource_restore_scope
end

#namespaced_resource_restore_modeString

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)


1497
1498
1499
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1497

def namespaced_resource_restore_mode
  @namespaced_resource_restore_mode
end

#selected_applicationsGoogle::Apis::GkebackupV1::NamespacedNames

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



1502
1503
1504
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1502

def selected_applications
  @selected_applications
end

#selected_namespacesGoogle::Apis::GkebackupV1::Namespaces

A list of Kubernetes Namespaces Corresponds to the JSON property selectedNamespaces



1507
1508
1509
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1507

def selected_namespaces
  @selected_namespaces
end

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

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



1516
1517
1518
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1516

def substitution_rules
  @substitution_rules
end

#volume_data_restore_policyString

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)


1523
1524
1525
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1523

def volume_data_restore_policy
  @volume_data_restore_policy
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1530

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)
  @namespaced_resource_restore_mode = args[:namespaced_resource_restore_mode] if args.key?(:namespaced_resource_restore_mode)
  @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)
  @volume_data_restore_policy = args[:volume_data_restore_policy] if args.key?(:volume_data_restore_policy)
end