Compute V1 Client - Class VmExtensionPolicyLabelSelector (2.9.0)

Reference documentation and code samples for the Compute V1 Client class VmExtensionPolicyLabelSelector.

A LabelSelector is applied to a VM only if it matches all the specified labels.

Generated from protobuf message google.cloud.compute.v1.VmExtensionPolicyLabelSelector

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ inclusion_labels array|Google\Protobuf\Internal\MapField

Optional. A map of key-value pairs representing VM labels. VMs must have all of the labels specified in this map to be selected (logical AND). e.g. If the inclusion_labels are {("key1", "value1"), ("key2", "value2")}, the VM labels must contain both ("key1", "value1") and ("key2", "value2") to be selected. If the VM labels are ("key1", "value1") and ("something", "else"), it will not be selected. If the map is empty, it's considered a match.

getInclusionLabels

Optional. A map of key-value pairs representing VM labels.

VMs must have all of the labels specified in this map to be selected (logical AND). e.g. If the inclusion_labels are {("key1", "value1"), ("key2", "value2")}, the VM labels must contain both ("key1", "value1") and ("key2", "value2") to be selected. If the VM labels are ("key1", "value1") and ("something", "else"), it will not be selected. If the map is empty, it's considered a match.

Returns
Type Description
Google\Protobuf\Internal\MapField

setInclusionLabels

Optional. A map of key-value pairs representing VM labels.

VMs must have all of the labels specified in this map to be selected (logical AND). e.g. If the inclusion_labels are {("key1", "value1"), ("key2", "value2")}, the VM labels must contain both ("key1", "value1") and ("key2", "value2") to be selected. If the VM labels are ("key1", "value1") and ("something", "else"), it will not be selected. If the map is empty, it's considered a match.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this