Class: Google::Apis::GkebackupV1::RestoreConfig
- Inherits:
-
Object
- Object
- Google::Apis::GkebackupV1::RestoreConfig
- 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: 12
Instance Attribute Summary collapse
-
#all_namespaces ⇒ Boolean
(also: #all_namespaces?)
Restore all namespaced resources in the Backup if set to "True".
-
#cluster_resource_conflict_policy ⇒ String
Optional.
-
#cluster_resource_restore_scope ⇒ Google::Apis::GkebackupV1::ClusterResourceRestoreScope
Defines the scope of cluster-scoped resources to restore.
-
#excluded_namespaces ⇒ Google::Apis::GkebackupV1::Namespaces
A list of Kubernetes Namespaces Corresponds to the JSON property
excludedNamespaces. -
#namespaced_resource_restore_mode ⇒ String
Optional.
-
#no_namespaces ⇒ Boolean
(also: #no_namespaces?)
Do not restore any namespaced resources if set to "True".
-
#selected_applications ⇒ Google::Apis::GkebackupV1::NamespacedNames
A list of namespaced Kubernetes resources.
-
#selected_namespaces ⇒ Google::Apis::GkebackupV1::Namespaces
A list of Kubernetes Namespaces Corresponds to the JSON property
selectedNamespaces. -
#substitution_rules ⇒ Array<Google::Apis::GkebackupV1::SubstitutionRule>
Optional.
-
#transformation_rules ⇒ Array<Google::Apis::GkebackupV1::TransformationRule>
Optional.
-
#volume_data_restore_policy ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RestoreConfig
constructor
A new instance of RestoreConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RestoreConfig
Returns a new instance of RestoreConfig.
1647 1648 1649 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1647 def initialize(**args) update!(**args) end |
Instance Attribute Details
#all_namespaces ⇒ Boolean 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
1569 1570 1571 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1569 def all_namespaces @all_namespaces end |
#cluster_resource_conflict_policy ⇒ String
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
1578 1579 1580 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1578 def cluster_resource_conflict_policy @cluster_resource_conflict_policy end |
#cluster_resource_restore_scope ⇒ Google::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. - gkebackup.gke.io/BackupJob - gkebackup.gke.io/
RestoreJob - metrics.k8s.io/NodeMetrics - migration.k8s.io/StorageState -
migration.k8s.io/StorageVersionMigration - Node - snapshot.storage.k8s.io/
VolumeSnapshotContent - storage.k8s.io/CSINode 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
1591 1592 1593 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1591 def cluster_resource_restore_scope @cluster_resource_restore_scope end |
#excluded_namespaces ⇒ Google::Apis::GkebackupV1::Namespaces
A list of Kubernetes Namespaces
Corresponds to the JSON property excludedNamespaces
1596 1597 1598 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1596 def excluded_namespaces @excluded_namespaces end |
#namespaced_resource_restore_mode ⇒ String
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
1603 1604 1605 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1603 def namespaced_resource_restore_mode @namespaced_resource_restore_mode end |
#no_namespaces ⇒ Boolean 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
1609 1610 1611 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1609 def no_namespaces @no_namespaces end |
#selected_applications ⇒ Google::Apis::GkebackupV1::NamespacedNames
A list of namespaced Kubernetes resources.
Corresponds to the JSON property selectedApplications
1615 1616 1617 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1615 def selected_applications @selected_applications end |
#selected_namespaces ⇒ Google::Apis::GkebackupV1::Namespaces
A list of Kubernetes Namespaces
Corresponds to the JSON property selectedNamespaces
1620 1621 1622 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1620 def selected_namespaces @selected_namespaces end |
#substitution_rules ⇒ Array<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
1629 1630 1631 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1629 def substitution_rules @substitution_rules end |
#transformation_rules ⇒ Array<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
1638 1639 1640 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1638 def transformation_rules @transformation_rules end |
#volume_data_restore_policy ⇒ String
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
1645 1646 1647 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1645 def volume_data_restore_policy @volume_data_restore_policy end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1652 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) @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) end |