v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-131,0021,0174.3 MB
machineImages

Sets the labels on a machine image. To learn more about labels, read theLabeling Resources documentation.

post/projects/{project}/global/machineImages/{resource}/setLabels

Path parameters

projectstring required

Project ID for this request.

resourcestring required

Name or id of the resource for this request.

Request body

labelFingerprintstring byte

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 error412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.

labelsobject

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": "").

Response

Successful response