Reference documentation and code samples for the Google Cloud Container V1 Client class SetLocationsRequest.
SetLocationsRequest sets the locations of the cluster.
Generated from protobuf messagegoogle.container.v1.SetLocationsRequest
Namespace
Google \ Cloud \ Container \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ project_id
string
Deprecated. The Google Developers Consoleproject ID or project number. This field has been deprecated and replaced by the name field.
↳ zone
string
Deprecated. The name of the Google Compute Enginezonein which the cluster resides. This field has been deprecated and replaced by the name field.
↳ cluster_id
string
Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
↳ locations
array
Required. The desired list of Google Compute Enginezonesin 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.
↳ name
string
The name (project, location, cluster) of the cluster to set locations. Specified in the formatprojects/*/locations/*/clusters/*.
This field has been deprecated and replaced by the name field.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getZone
Deprecated. The name of the Google Compute Enginezonein which the cluster resides. This field has been deprecated and replaced
by the name field.
Returns
Type
Description
string
setZone
Deprecated. The name of the Google Compute Enginezonein which the cluster resides. This field has been deprecated and replaced
by the name field.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getClusterId
Deprecated. The name of the cluster to upgrade.
This field has been deprecated and replaced by the name field.
Returns
Type
Description
string
setClusterId
Deprecated. The name of the cluster to upgrade.
This field has been deprecated and replaced by the name field.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getLocations
Required. The desired list of Google Compute Enginezonesin 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.
Required. The desired list of Google Compute Enginezonesin 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.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getName
The name (project, location, cluster) of the cluster to set locations.
Specified in the formatprojects/*/locations/*/clusters/*.
Returns
Type
Description
string
setName
The name (project, location, cluster) of the cluster to set locations.
Specified in the formatprojects/*/locations/*/clusters/*.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
static::build
Parameters
Name
Description
projectId
string
Deprecated. The Google Developers Consoleproject ID or project
number.
This field has been deprecated and replaced by the name field.
zone
string
Deprecated. The name of the Google Compute Enginezonein which the cluster resides. This field has been deprecated and replaced
by the name field.
clusterId
string
Deprecated. The name of the cluster to upgrade.
This field has been deprecated and replaced by the name field.
locations
string[]
Required. The desired list of Google Compute Enginezonesin 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.
The name (project, location, cluster) of the cluster to set locations.
Specified in the formatprojects/*/locations/*/clusters/*.
locations
string[]
Required. The desired list of Google Compute Enginezonesin 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."],[],[],null,["# Google Cloud Container V1 Client - Class SetLocationsRequest (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/php/docs/reference/cloud-container/latest/V1.SetLocationsRequest)\n- [2.4.0](/php/docs/reference/cloud-container/2.4.0/V1.SetLocationsRequest)\n- [2.3.4](/php/docs/reference/cloud-container/2.3.4/V1.SetLocationsRequest)\n- [2.2.1](/php/docs/reference/cloud-container/2.2.1/V1.SetLocationsRequest)\n- [2.1.0](/php/docs/reference/cloud-container/2.1.0/V1.SetLocationsRequest)\n- [2.0.0](/php/docs/reference/cloud-container/2.0.0/V1.SetLocationsRequest)\n- [1.33.0](/php/docs/reference/cloud-container/1.33.0/V1.SetLocationsRequest)\n- [1.32.0](/php/docs/reference/cloud-container/1.32.0/V1.SetLocationsRequest)\n- [1.31.0](/php/docs/reference/cloud-container/1.31.0/V1.SetLocationsRequest)\n- [1.30.3](/php/docs/reference/cloud-container/1.30.3/V1.SetLocationsRequest)\n- [1.24.0](/php/docs/reference/cloud-container/1.24.0/V1.SetLocationsRequest)\n- [1.23.0](/php/docs/reference/cloud-container/1.23.0/V1.SetLocationsRequest)\n- [1.22.0](/php/docs/reference/cloud-container/1.22.0/V1.SetLocationsRequest)\n- [1.21.1](/php/docs/reference/cloud-container/1.21.1/V1.SetLocationsRequest)\n- [1.20.0](/php/docs/reference/cloud-container/1.20.0/V1.SetLocationsRequest)\n- [1.19.0](/php/docs/reference/cloud-container/1.19.0/V1.SetLocationsRequest)\n- [1.18.0](/php/docs/reference/cloud-container/1.18.0/V1.SetLocationsRequest)\n- [1.17.1](/php/docs/reference/cloud-container/1.17.1/V1.SetLocationsRequest)\n- [1.16.0](/php/docs/reference/cloud-container/1.16.0/V1.SetLocationsRequest)\n- [1.15.0](/php/docs/reference/cloud-container/1.15.0/V1.SetLocationsRequest)\n- [1.14.0](/php/docs/reference/cloud-container/1.14.0/V1.SetLocationsRequest)\n- [1.13.1](/php/docs/reference/cloud-container/1.13.1/V1.SetLocationsRequest)\n- [1.12.1](/php/docs/reference/cloud-container/1.12.1/V1.SetLocationsRequest)\n- [1.10.3](/php/docs/reference/cloud-container/1.10.3/V1.SetLocationsRequest)\n- [1.9.1](/php/docs/reference/cloud-container/1.9.1/V1.SetLocationsRequest) \nReference documentation and code samples for the Google Cloud Container V1 Client class SetLocationsRequest.\n\nSetLocationsRequest sets the locations of the cluster.\n\nGenerated from protobuf message `google.container.v1.SetLocationsRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Container \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getProjectId\n\nDeprecated. The Google Developers Console [project ID or project\nnumber](https://cloud.google.com/resource-manager/docs/creating-managing-projects).\n\nThis field has been deprecated and replaced by the name field.\n\n### setProjectId\n\nDeprecated. The Google Developers Console [project ID or project\nnumber](https://cloud.google.com/resource-manager/docs/creating-managing-projects).\n\nThis field has been deprecated and replaced by the name field.\n\n### getZone\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.\n\n### setZone\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.\n\n### getClusterId\n\nDeprecated. The name of the cluster to upgrade.\n\nThis field has been deprecated and replaced by the name field.\n\n### setClusterId\n\nDeprecated. The name of the cluster to upgrade.\n\nThis field has been deprecated and replaced by the name field.\n\n### getLocations\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### setLocations\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### getName\n\nThe name (project, location, cluster) of the cluster to set locations.\n\nSpecified in the format `projects/*/locations/*/clusters/*`.\n\n### setName\n\nThe name (project, location, cluster) of the cluster to set locations.\n\nSpecified in the format `projects/*/locations/*/clusters/*`.\n\n### static::build\n\n### static::buildFromNameLocations"]]