Class: Google::Apis::GkebackupV1::ResourceSelector
- Inherits:
-
Object
- Object
- Google::Apis::GkebackupV1::ResourceSelector
- 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
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.
Instance Attribute Summary collapse
-
#group_kind ⇒ Google::Apis::GkebackupV1::GroupKind
This is a direct map to the Kubernetes GroupKind type GroupKind and is used for identifying specific "types" of resources to restore.
-
#labels ⇒ Hash<String,String>
Optional.
-
#name ⇒ String
Optional.
-
#namespace ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ResourceSelector
constructor
A new instance of ResourceSelector.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ResourceSelector
Returns a new instance of ResourceSelector.
1730 1731 1732 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1730 def initialize(**args) update!(**args) end |
Instance Attribute Details
#group_kind ⇒ Google::Apis::GkebackupV1::GroupKind
This is a direct map to the Kubernetes GroupKind type GroupKind and is used for
identifying specific "types" of resources to restore.
Corresponds to the JSON property groupKind
1703 1704 1705 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1703 def group_kind @group_kind end |
#labels ⇒ Hash<String,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.
Corresponds to the JSON property labels
1711 1712 1713 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1711 def labels @labels end |
#name ⇒ String
Optional. Selects resources using their resource names. If specified, only
resources with the provided name will be selected.
Corresponds to the JSON property name
1717 1718 1719 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1717 def name @name end |
#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.
Corresponds to the JSON property namespace
1728 1729 1730 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1728 def namespace @namespace end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1735 1736 1737 1738 1739 1740 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1735 def update!(**args) @group_kind = args[:group_kind] if args.key?(:group_kind) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @namespace = args[:namespace] if args.key?(:namespace) end |