Class: Google::Apis::OsconfigV1::PatchInstanceFilterGroupLabel

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/osconfig_v1/classes.rb,
lib/google/apis/osconfig_v1/representations.rb,
lib/google/apis/osconfig_v1/representations.rb

Overview

Targets a group of VM instances by using their assigned labels. Labels are key-value pairs. A GroupLabel is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following GroupLabel: "env":"test", "app":"web". This means that the patch job is applied to VMs that have both the labels env=test and app=web.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PatchInstanceFilterGroupLabel

Returns a new instance of PatchInstanceFilterGroupLabel.



2939
2940
2941
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2939

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#labelsHash<String,String>

Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


2937
2938
2939
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2937

def labels
  @labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2944
2945
2946
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2944

def update!(**args)
  @labels = args[:labels] if args.key?(:labels)
end