Class: Google::Apis::OsconfigV1alpha::OsPolicyAssignmentInstanceFilter

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 to represent the filters to select VMs for an assignment

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OsPolicyAssignmentInstanceFilter

Returns a new instance of OsPolicyAssignmentInstanceFilter.



1050
1051
1052
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1050

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

Instance Attribute Details

#allBoolean Also known as: all?

Target all VMs in the project. If true, no other criteria is permitted. Corresponds to the JSON property all

Returns:

  • (Boolean)


1026
1027
1028
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1026

def all
  @all
end

#exclusion_labelsArray<Google::Apis::OsconfigV1alpha::OsPolicyAssignmentLabelSet>

List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM. This filter is applied last in the filtering chain and therefore a VM is guaranteed to be excluded if it satisfies one of the below label sets. Corresponds to the JSON property exclusionLabels



1035
1036
1037
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1035

def exclusion_labels
  @exclusion_labels
end

#inclusion_labelsArray<Google::Apis::OsconfigV1alpha::OsPolicyAssignmentLabelSet>

List of label sets used for VM inclusion. If the list has more than one LabelSet, the VM is included if any of the label sets are applicable for the VM. Corresponds to the JSON property inclusionLabels



1042
1043
1044
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1042

def inclusion_labels
  @inclusion_labels
end

#os_short_namesArray<String>

A VM is included if it's OS short name matches with any of the values provided in this list. Corresponds to the JSON property osShortNames

Returns:

  • (Array<String>)


1048
1049
1050
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1048

def os_short_names
  @os_short_names
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1055
1056
1057
1058
1059
1060
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1055

def update!(**args)
  @all = args[:all] if args.key?(:all)
  @exclusion_labels = args[:exclusion_labels] if args.key?(:exclusion_labels)
  @inclusion_labels = args[:inclusion_labels] if args.key?(:inclusion_labels)
  @os_short_names = args[:os_short_names] if args.key?(:os_short_names)
end