Class: Google::Apis::OsconfigV1alpha::OsPolicyAssignmentLabelSet

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

Overview

Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: env=prod and type= webserver will only be applicable for those VMs with both labels present.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OsPolicyAssignmentLabelSet

Returns a new instance of OsPolicyAssignmentLabelSet.



1294
1295
1296
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1294

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

Instance Attribute Details

#labelsHash<String,String>

Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1292
1293
1294
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1292

def labels
  @labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1299
1300
1301
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1299

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