---
title: "POST /v1/{+name}:setResourceLabels"
method: POST
path: "/v1/{+name}:setResourceLabels"
tags: ["projects"]
---

# POST /v1/{+name}:setResourceLabels

`POST /v1/{+name}:setResourceLabels`

Sets labels on a cluster.

## Path parameters

- `name` string, required

## Request body

- SetLabelsRequest — SetLabelsRequest sets the Google Cloud Platform labels on a Google Container Engine cluster, which will in turn set them for Google Compute Engine resources used by that cluster
  - `labelFingerprint` string — Required. The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Kubernetes 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. Make a `get()` request to the resource to get the latest fingerprint.
  - `zone` string — Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.
  - `projectId` string — Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.
  - `clusterId` string — Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.
  - `name` string — The name (project, location, cluster name) of the cluster to set labels. Specified in the format `projects/*/locations/*/clusters/*`.
  - `resourceLabels` object — Required. The labels to set for that cluster.

## Response `200`

Successful response

---

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