public sealed class SetLabelsRequest : IMessage<SetLabelsRequest>, IEquatable<SetLabelsRequest>, IDeepCloneable<SetLabelsRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Kubernetes Engine v1 API class 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
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis webpage provides reference documentation for the \u003ccode\u003eSetLabelsRequest\u003c/code\u003e class within the Google Kubernetes Engine v1 API for .NET.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSetLabelsRequest\u003c/code\u003e class is used to set Google Cloud Platform labels on a Google Container Engine cluster, which then applies them to associated Google Compute Engine resources.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is 3.33.0, with numerous older versions listed, down to version 2.3.0, allowing for version specific documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSetLabelsRequest\u003c/code\u003e class includes properties such as \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eLabelFingerprint\u003c/code\u003e, and \u003ccode\u003eResourceLabels\u003c/code\u003e, along with deprecated properties \u003ccode\u003eClusterId\u003c/code\u003e, \u003ccode\u003eProjectId\u003c/code\u003e, and \u003ccode\u003eZone\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class also inherits and implements several interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and has constructors to initiate and use the class.\u003c/p\u003e\n"]]],[],null,["# Google Kubernetes Engine v1 API - Class SetLabelsRequest (3.35.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.35.0 (latest)](/dotnet/docs/reference/Google.Cloud.Container.V1/latest/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.34.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.34.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.33.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.33.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.32.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.32.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.31.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.31.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.30.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.30.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.29.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.29.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.28.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.28.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.27.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.27.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.26.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.26.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.25.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.25.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.24.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.24.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.23.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.23.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.22.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.22.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.21.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.21.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.20.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.20.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.19.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.19.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.18.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.18.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.17.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.17.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.16.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.16.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.15.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.15.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.14.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.13.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.12.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.11.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.10.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.9.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.8.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.7.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.6.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.5.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.4.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.3.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.2.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.1.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.0.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Container.V1/2.7.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Container.V1/2.6.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Container.V1/2.5.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Container.V1/2.4.0/Google.Cloud.Container.V1.SetLabelsRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Container.V1/2.3.0/Google.Cloud.Container.V1.SetLabelsRequest) \n\n public sealed class SetLabelsRequest : IMessage\u003cSetLabelsRequest\u003e, IEquatable\u003cSetLabelsRequest\u003e, IDeepCloneable\u003cSetLabelsRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Kubernetes Engine v1 API class SetLabelsRequest.\n\nSetLabelsRequest sets the Google Cloud Platform labels on a Google Container\nEngine cluster, which will in turn set them for Google Compute Engine\nresources used by that cluster \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SetLabelsRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SetLabelsRequest](/dotnet/docs/reference/Google.Cloud.Container.V1/latest/Google.Cloud.Container.V1.SetLabelsRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SetLabelsRequest](/dotnet/docs/reference/Google.Cloud.Container.V1/latest/Google.Cloud.Container.V1.SetLabelsRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SetLabelsRequest](/dotnet/docs/reference/Google.Cloud.Container.V1/latest/Google.Cloud.Container.V1.SetLabelsRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Container.V1](/dotnet/docs/reference/Google.Cloud.Container.V1/latest/Google.Cloud.Container.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Container.V1.dll\n\nConstructors\n------------\n\n### SetLabelsRequest()\n\n public SetLabelsRequest()\n\n### SetLabelsRequest(SetLabelsRequest)\n\n public SetLabelsRequest(SetLabelsRequest other)\n\nProperties\n----------\n\n### ClusterId\n\n [Obsolete]\n public string ClusterId { get; set; }\n\nDeprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.\n\n### LabelFingerprint\n\n public string LabelFingerprint { get; set; }\n\nRequired. The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nKubernetes Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a `get()` request to the\nresource to get the latest fingerprint.\n\n### Name\n\n public string Name { get; set; }\n\nThe name (project, location, cluster name) of the cluster to set labels.\nSpecified in the format `projects/*/locations/*/clusters/*`.\n\n### ProjectId\n\n [Obsolete]\n public string ProjectId { get; set; }\n\nDeprecated. The Google Developers Console [project ID or project\nnumber](https://cloud.google.com/resource-manager/docs/creating-managing-projects).\nThis field has been deprecated and replaced by the name field.\n\n### ResourceLabels\n\n public MapField\u003cstring, string\u003e ResourceLabels { get; }\n\nRequired. The labels to set for that cluster.\n\n### Zone\n\n [Obsolete]\n public string Zone { get; set; }\n\nDeprecated. The name of the Google Compute Engine\n[zone](https://cloud.google.com/compute/docs/zones#available)\nin which the cluster resides. This field has been deprecated and replaced\nby the name field."]]