class Google::Apis::OsconfigV1::PatchInstanceFilter

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.

Attributes

all[RW]

Target all VM instances in the project. If true, no other criteria is permitted. Corresponds to the JSON property `all` @return [Boolean]

all?[RW]

Target all VM instances in the project. If true, no other criteria is permitted. Corresponds to the JSON property `all` @return [Boolean]

group_labels[RW]

Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances. Corresponds to the JSON property `groupLabels` @return [Array<Google::Apis::OsconfigV1::PatchInstanceFilterGroupLabel>]

instance_name_prefixes[RW]

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` @return [Array<String>]

instances[RW]

Targets any of the VM instances specified. Instances are specified by their URI in the form `zones//instances/`, `projects/[ PROJECT_ID]/zones//instances/`, or `www. googleapis.com/compute/v1/projects//zones//instances/[ INSTANCE_NAME]` Corresponds to the JSON property `instances` @return [Array<String>]

zones[RW]

Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. Corresponds to the JSON property `zones` @return [Array<String>]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/osconfig_v1/classes.rb, line 1241
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/osconfig_v1/classes.rb, line 1246
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