Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class LocationPreference.
Preferred location. This specifies where a Cloud SQL instance is located.
Note that if the preferred location is not available, the instance will be
located as close as possible within the region. Only one location may be
specified.
Generated from protobuf messagegoogle.cloud.sql.v1.LocationPreference
Namespace
Google \ Cloud \ Sql \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ follow_gae_application
string
The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.
↳ zone
string
The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.
↳ secondary_zone
string
The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). To disable this field, set it to 'no_secondary_zone'.
↳ kind
string
This is alwayssql#locationPreference.
getFollowGaeApplication
The App Engine application to follow, it must be in the same region as the
Cloud SQL instance. WARNING: Changing this might restart the instance.
Returns
Type
Description
string
setFollowGaeApplication
The App Engine application to follow, it must be in the same region as the
Cloud SQL instance. WARNING: Changing this might restart the instance.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getZone
The preferred Compute Engine zone (for example: us-central1-a,
us-central1-b, etc.). WARNING: Changing this might restart the instance.
Returns
Type
Description
string
setZone
The preferred Compute Engine zone (for example: us-central1-a,
us-central1-b, etc.). WARNING: Changing this might restart the instance.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSecondaryZone
The preferred Compute Engine zone for the secondary/failover
(for example: us-central1-a, us-central1-b, etc.).
To disable this field, set it to 'no_secondary_zone'.
Returns
Type
Description
string
setSecondaryZone
The preferred Compute Engine zone for the secondary/failover
(for example: us-central1-a, us-central1-b, etc.).
To disable this field, set it to 'no_secondary_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 Sql Admin V1 Client - Class LocationPreference (1.2.6)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.6 (latest)](/php/docs/reference/cloud-sql-admin/latest/V1.LocationPreference)\n- [1.2.5](/php/docs/reference/cloud-sql-admin/1.2.5/V1.LocationPreference)\n- [1.1.0](/php/docs/reference/cloud-sql-admin/1.1.0/V1.LocationPreference)\n- [1.0.0](/php/docs/reference/cloud-sql-admin/1.0.0/V1.LocationPreference)\n- [0.19.0](/php/docs/reference/cloud-sql-admin/0.19.0/V1.LocationPreference)\n- [0.18.0](/php/docs/reference/cloud-sql-admin/0.18.0/V1.LocationPreference)\n- [0.17.1](/php/docs/reference/cloud-sql-admin/0.17.1/V1.LocationPreference)\n- [0.16.1](/php/docs/reference/cloud-sql-admin/0.16.1/V1.LocationPreference)\n- [0.12.0](/php/docs/reference/cloud-sql-admin/0.12.0/V1.LocationPreference)\n- [0.11.0](/php/docs/reference/cloud-sql-admin/0.11.0/V1.LocationPreference)\n- [0.10.0](/php/docs/reference/cloud-sql-admin/0.10.0/V1.LocationPreference)\n- [0.9.0](/php/docs/reference/cloud-sql-admin/0.9.0/V1.LocationPreference)\n- [0.8.0](/php/docs/reference/cloud-sql-admin/0.8.0/V1.LocationPreference)\n- [0.7.0](/php/docs/reference/cloud-sql-admin/0.7.0/V1.LocationPreference)\n- [0.6.0](/php/docs/reference/cloud-sql-admin/0.6.0/V1.LocationPreference)\n- [0.5.0](/php/docs/reference/cloud-sql-admin/0.5.0/V1.LocationPreference)\n- [0.4.1](/php/docs/reference/cloud-sql-admin/0.4.1/V1.LocationPreference)\n- [0.3.1](/php/docs/reference/cloud-sql-admin/0.3.1/V1.LocationPreference)\n- [0.2.12](/php/docs/reference/cloud-sql-admin/0.2.12/V1.LocationPreference) \nReference documentation and code samples for the Google Cloud Sql Admin V1 Client class LocationPreference.\n\nPreferred location. This specifies where a Cloud SQL instance is located.\n\nNote that if the preferred location is not available, the instance will be\nlocated as close as possible within the region. Only one location may be\nspecified.\n\nGenerated from protobuf message `google.cloud.sql.v1.LocationPreference`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Sql \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getFollowGaeApplication\n\nThe App Engine application to follow, it must be in the same region as the\nCloud SQL instance. WARNING: Changing this might restart the instance.\n\n### setFollowGaeApplication\n\nThe App Engine application to follow, it must be in the same region as the\nCloud SQL instance. WARNING: Changing this might restart the instance.\n\n### getZone\n\nThe preferred Compute Engine zone (for example: us-central1-a,\nus-central1-b, etc.). WARNING: Changing this might restart the instance.\n\n### setZone\n\nThe preferred Compute Engine zone (for example: us-central1-a,\nus-central1-b, etc.). WARNING: Changing this might restart the instance.\n\n### getSecondaryZone\n\nThe preferred Compute Engine zone for the secondary/failover\n(for example: us-central1-a, us-central1-b, etc.).\n\nTo disable this field, set it to 'no_secondary_zone'.\n\n### setSecondaryZone\n\nThe preferred Compute Engine zone for the secondary/failover\n(for example: us-central1-a, us-central1-b, etc.).\n\nTo disable this field, set it to 'no_secondary_zone'.\n\n### getKind\n\nThis is always `sql#locationPreference`.\n\n### setKind\n\nThis is always `sql#locationPreference`."]]