Google Cloud OsConfig V1 Client - Class InstanceFilter (2.0.0)

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
Name Description
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
Type Description
bool

setAll

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

Parameter
Name Description
var bool
Returns
Type Description
$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
Type Description
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
Name Description
var array<Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>
Returns
Type Description
$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
Type Description
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
Name Description
var array<Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>
Returns
Type Description
$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
Type Description
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
Name Description
var array<Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter\Inventory>
Returns
Type Description
$this