Class: Google::Apis::OsconfigV1::OsPolicyAssignmentInstanceFilter

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

Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OsPolicyAssignmentInstanceFilter

Returns a new instance of OsPolicyAssignmentInstanceFilter.



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

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)


1447
1448
1449
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1447

def all
  @all
end

#exclusion_labelsArray<Google::Apis::OsconfigV1::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. Corresponds to the JSON property exclusionLabels



1454
1455
1456
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1454

def exclusion_labels
  @exclusion_labels
end

#inclusion_labelsArray<Google::Apis::OsconfigV1::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



1461
1462
1463
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1461

def inclusion_labels
  @inclusion_labels
end

#inventoriesArray<Google::Apis::OsconfigV1::OsPolicyAssignmentInstanceFilterInventory>

List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories. Corresponds to the JSON property inventories



1467
1468
1469
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1467

def inventories
  @inventories
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1474
1475
1476
1477
1478
1479
# File 'lib/google/apis/osconfig_v1/classes.rb', line 1474

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)
  @inventories = args[:inventories] if args.key?(:inventories)
end