---
title: "POST /projects/{project}/zones/{zone}/instances/{instance}/setLabels"
method: POST
path: "/projects/{project}/zones/{zone}/instances/{instance}/setLabels"
tags: ["instances"]
---

# POST /projects/{project}/zones/{zone}/instances/{instance}/setLabels

`POST /projects/{project}/zones/{zone}/instances/{instance}/setLabels`

Sets labels on an instance.  To learn more about labels, read theLabeling
Resources documentation.

## Path parameters

- `project` string, required
- `zone` string, required
- `instance` string, required

## Query parameters

- `requestId` string

## Request body

- InstancesSetLabelsRequest
  - `labels` object
  - `labelFingerprint` string, byte — Fingerprint of the previous set of labels for this resource, used to prevent conflicts. Provide the latest fingerprint value when making a request to add or change labels.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/compute.md) · [All operations](https://skmtc.net/google/apis/compute/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/compute/versions/6120ed8969d4/schema)
