public sealed class SetLocationsRequest : IMessage<SetLocationsRequest>, IEquatable<SetLocationsRequest>, IDeepCloneable<SetLocationsRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Kubernetes Engine v1 API class SetLocationsRequest.
SetLocationsRequest sets the locations of the cluster.
Required. The desired list of Google Compute Engine
zones
in which the cluster's nodes should be located. Changing the locations a
cluster is in will result in nodes being either created or removed from the
cluster, depending on whether locations are being added or removed.
This list must always include the cluster's primary zone.
[[["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 documentation for the \u003ccode\u003eSetLocationsRequest\u003c/code\u003e class within the Google Kubernetes Engine v1 API for .NET.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSetLocationsRequest\u003c/code\u003e is used to specify the desired Google Compute Engine zones for a cluster's nodes and is implemented as part of the Google.Cloud.Container.V1 namespace.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version documented is 3.33.0, and the page contains documentation for the class for multiple historical versions dating back to version 2.3.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSetLocationsRequest\u003c/code\u003e class implements interfaces such as IMessage, IEquatable, IDeepCloneable, and IBufferMessage, and inherits from the base object class.\u003c/p\u003e\n"],["\u003cp\u003eThe class properties \u003ccode\u003eName\u003c/code\u003e and \u003ccode\u003eLocations\u003c/code\u003e are core to its function, indicating which cluster and where the cluster should be set, while \u003ccode\u003eClusterId\u003c/code\u003e, \u003ccode\u003eProjectId\u003c/code\u003e, and \u003ccode\u003eZone\u003c/code\u003e are deprecated properties.\u003c/p\u003e\n"]]],[],null,["# Google Kubernetes Engine v1 API - Class SetLocationsRequest (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.SetLocationsRequest)\n- [3.34.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.34.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.33.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.33.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.32.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.32.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.31.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.31.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.30.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.30.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.29.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.29.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.28.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.28.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.27.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.27.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.26.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.26.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.25.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.25.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.24.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.24.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.23.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.23.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.22.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.22.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.21.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.21.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.20.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.20.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.19.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.19.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.18.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.18.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.17.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.17.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.16.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.16.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.15.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.15.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.14.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.13.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.12.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.11.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.10.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.9.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.8.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.7.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.6.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.5.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.4.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.3.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.2.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.1.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Container.V1/3.0.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Container.V1/2.7.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Container.V1/2.6.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Container.V1/2.5.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Container.V1/2.4.0/Google.Cloud.Container.V1.SetLocationsRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Container.V1/2.3.0/Google.Cloud.Container.V1.SetLocationsRequest) \n\n public sealed class SetLocationsRequest : IMessage\u003cSetLocationsRequest\u003e, IEquatable\u003cSetLocationsRequest\u003e, IDeepCloneable\u003cSetLocationsRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Kubernetes Engine v1 API class SetLocationsRequest.\n\nSetLocationsRequest sets the locations of the cluster. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SetLocationsRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SetLocationsRequest](/dotnet/docs/reference/Google.Cloud.Container.V1/latest/Google.Cloud.Container.V1.SetLocationsRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SetLocationsRequest](/dotnet/docs/reference/Google.Cloud.Container.V1/latest/Google.Cloud.Container.V1.SetLocationsRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SetLocationsRequest](/dotnet/docs/reference/Google.Cloud.Container.V1/latest/Google.Cloud.Container.V1.SetLocationsRequest), [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### SetLocationsRequest()\n\n public SetLocationsRequest()\n\n### SetLocationsRequest(SetLocationsRequest)\n\n public SetLocationsRequest(SetLocationsRequest other)\n\nProperties\n----------\n\n### ClusterId\n\n [Obsolete]\n public string ClusterId { get; set; }\n\nDeprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.\n\n### Locations\n\n public RepeatedField\u003cstring\u003e Locations { get; }\n\nRequired. The desired list of Google Compute Engine\n[zones](https://cloud.google.com/compute/docs/zones#available)\nin which the cluster's nodes should be located. Changing the locations a\ncluster is in will result in nodes being either created or removed from the\ncluster, depending on whether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.\n\n### Name\n\n public string Name { get; set; }\n\nThe name (project, location, cluster) of the cluster to set locations.\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### 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."]]