Google Cloud OsConfig V1 Client - Class InstanceFilter (1.2.2)

Reference documentation and code samples for the Google Cloud OsConfig V1 Client class InstanceFilter.

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.

Generated from protobuf message google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter

Namespace

Google \ Cloud \ OsConfig \ V1 \ OSPolicyAssignment

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ all bool

Target all VMs in the project. If true, no other criteria is permitted.

↳ inclusion_labels array<Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>

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.

↳ exclusion_labels array<Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>

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.

↳ inventories array<Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter\Inventory>

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

getAll

Target all VMs in the project. If true, no other criteria is permitted.

Returns
TypeDescription
bool

setAll

Target all VMs in the project. If true, no other criteria is permitted.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getInclusionLabels

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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setInclusionLabels

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.

Parameter
NameDescription
var array<Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>
Returns
TypeDescription
$this

getExclusionLabels

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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setExclusionLabels

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.

Parameter
NameDescription
var array<Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>
Returns
TypeDescription
$this

getInventories

List of inventories to select VMs.

A VM is selected if its inventory data matches at least one of the following inventories.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setInventories

List of inventories to select VMs.

A VM is selected if its inventory data matches at least one of the following inventories.

Parameter
NameDescription
var array<Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter\Inventory>
Returns
TypeDescription
$this