Compute V1 Client - Class GlobalSetLabelsRequest (1.17.0)

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

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

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ label_fingerprint string

The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.

↳ labels array|Google\Protobuf\Internal\MapField

A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example, "webserver-frontend": "images". A label value can also be empty (e.g. "my-label": "").

getLabelFingerprint

The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.

Returns
Type Description
string

hasLabelFingerprint

clearLabelFingerprint

setLabelFingerprint

The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.

Parameter
Name Description
var string
Returns
Type Description
$this

getLabels

A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example, "webserver-frontend": "images". A label value can also be empty (e.g. "my-label": "").

Returns
Type Description
Google\Protobuf\Internal\MapField

setLabels

A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example, "webserver-frontend": "images". A label value can also be empty (e.g. "my-label": "").

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