Class: Google::Apis::OsconfigV1::OsPolicyAssignmentLabelSet

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

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.



1465
1466
1467
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1465

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>)


1463
1464
1465
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1463

def labels
  @labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1470
1471
1472
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1470

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