Class: Google::Apis::OsconfigV1beta::PatchInstanceFilter
- Inherits:
-
Object
- Object
- Google::Apis::OsconfigV1beta::PatchInstanceFilter
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/osconfig_v1beta/classes.rb,
generated/google/apis/osconfig_v1beta/representations.rb,
generated/google/apis/osconfig_v1beta/representations.rb
Overview
A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones.
Instance Attribute Summary collapse
-
#all ⇒ Boolean
(also: #all?)
Target all VM instances in the project.
-
#group_labels ⇒ Array<Google::Apis::OsconfigV1beta::PatchInstanceFilterGroupLabel>
Targets VM instances matching at least one of these label sets.
-
#instance_name_prefixes ⇒ Array<String>
Targets VMs whose name starts with one of these prefixes.
-
#instances ⇒ Array<String>
Targets any of the VM instances specified.
-
#zones ⇒ Array<String>
Targets VM instances in ANY of these zones.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PatchInstanceFilter
constructor
A new instance of PatchInstanceFilter.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ PatchInstanceFilter
Returns a new instance of PatchInstanceFilter.
1168 1169 1170 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1168 def initialize(**args) update!(**args) end |
Instance Attribute Details
#all ⇒ Boolean Also known as: all?
Target all VM instances in the project. If true, no other criteria is
permitted.
Corresponds to the JSON property all
1137 1138 1139 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1137 def all @all end |
#group_labels ⇒ Array<Google::Apis::OsconfigV1beta::PatchInstanceFilterGroupLabel>
Targets VM instances matching at least one of these label sets. This allows
targeting of disparate groups, for example "env=prod or env=staging".
Corresponds to the JSON property groupLabels
1144 1145 1146 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1144 def group_labels @group_labels end |
#instance_name_prefixes ⇒ Array<String>
Targets VMs whose name starts with one of these prefixes. Similar to
labels, this is another way to group VMs when targeting configs, for
example prefix="prod-".
Corresponds to the JSON property instanceNamePrefixes
1151 1152 1153 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1151 def instance_name_prefixes @instance_name_prefixes end |
#instances ⇒ Array<String>
Targets any of the VM instances specified. Instances are specified by their
URI in the form zones/[ZONE]/instances/[INSTANCE_NAME],
projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or
https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/
instances/[INSTANCE_NAME]
Corresponds to the JSON property
instances`
1160 1161 1162 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1160 def instances @instances end |
#zones ⇒ Array<String>
Targets VM instances in ANY of these zones. Leave empty to target VM
instances in any zone.
Corresponds to the JSON property zones
1166 1167 1168 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1166 def zones @zones end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1173 1174 1175 1176 1177 1178 1179 |
# File 'generated/google/apis/osconfig_v1beta/classes.rb', line 1173 def update!(**args) @all = args[:all] if args.key?(:all) @group_labels = args[:group_labels] if args.key?(:group_labels) @instance_name_prefixes = args[:instance_name_prefixes] if args.key?(:instance_name_prefixes) @instances = args[:instances] if args.key?(:instances) @zones = args[:zones] if args.key?(:zones) end |