Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates.
Timestamp, if specified, identifies the time to which the source instance is cloned.
↳ allocated_ip_range
string
The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply withRFC 1035. Specifically, the name must be 1-63 characters long and match the regular expressiona-z?. Reserved for future use.
↳ database_names
array
(SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty.
↳ preferred_zone
string
Optional. Copy clone and point-in-time recovery clone of an instance to the specified zone. If no zone is specified, clone to the same primary zone as the source instance. This field applies to all DB types.
getKind
This is alwayssql#cloneContext.
Returns
Type
Description
string
setKind
This is alwayssql#cloneContext.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getPitrTimestampMs
Reserved for future use.
Returns
Type
Description
int|string
setPitrTimestampMs
Reserved for future use.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getDestinationInstanceName
Name of the Cloud SQL instance to be created as a clone.
Returns
Type
Description
string
setDestinationInstanceName
Name of the Cloud SQL instance to be created as a clone.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getBinLogCoordinates
Binary log coordinates, if specified, identify the position up to which the
source instance is cloned. If not specified, the source instance is
cloned up to the most recent binary log coordinates.
Binary log coordinates, if specified, identify the position up to which the
source instance is cloned. If not specified, the source instance is
cloned up to the most recent binary log coordinates.
The name of the allocated ip range for the private ip Cloud SQL instance.
For example: "google-managed-services-default". If set, the cloned instance
ip will be created in the allocated range. The range name must comply withRFC 1035. Specifically, the name
must be 1-63 characters long and match the regular expressiona-z?.
Reserved for future use.
Returns
Type
Description
string
setAllocatedIpRange
The name of the allocated ip range for the private ip Cloud SQL instance.
For example: "google-managed-services-default". If set, the cloned instance
ip will be created in the allocated range. The range name must comply withRFC 1035. Specifically, the name
must be 1-63 characters long and match the regular expressiona-z?.
Reserved for future use.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDatabaseNames
(SQL Server only) Clone only the specified databases from the source
instance. Clone all databases if empty.
(SQL Server only) Clone only the specified databases from the source
instance. Clone all databases if empty.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getPreferredZone
Optional. Copy clone and point-in-time recovery clone of an instance to the
specified zone. If no zone is specified, clone to the same primary zone as
the source instance. This field applies to all DB types.
Returns
Type
Description
string
hasPreferredZone
clearPreferredZone
setPreferredZone
Optional. Copy clone and point-in-time recovery clone of an instance to the
specified zone. If no zone is specified, clone to the same primary zone as
the source instance. This field applies to all DB types.
[[["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 CloneContext (1.2.6)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.6 (latest)](/php/docs/reference/cloud-sql-admin/latest/V1.CloneContext)\n- [1.2.5](/php/docs/reference/cloud-sql-admin/1.2.5/V1.CloneContext)\n- [1.1.0](/php/docs/reference/cloud-sql-admin/1.1.0/V1.CloneContext)\n- [1.0.0](/php/docs/reference/cloud-sql-admin/1.0.0/V1.CloneContext)\n- [0.19.0](/php/docs/reference/cloud-sql-admin/0.19.0/V1.CloneContext)\n- [0.18.0](/php/docs/reference/cloud-sql-admin/0.18.0/V1.CloneContext)\n- [0.17.1](/php/docs/reference/cloud-sql-admin/0.17.1/V1.CloneContext)\n- [0.16.1](/php/docs/reference/cloud-sql-admin/0.16.1/V1.CloneContext)\n- [0.12.0](/php/docs/reference/cloud-sql-admin/0.12.0/V1.CloneContext)\n- [0.11.0](/php/docs/reference/cloud-sql-admin/0.11.0/V1.CloneContext)\n- [0.10.0](/php/docs/reference/cloud-sql-admin/0.10.0/V1.CloneContext)\n- [0.9.0](/php/docs/reference/cloud-sql-admin/0.9.0/V1.CloneContext)\n- [0.8.0](/php/docs/reference/cloud-sql-admin/0.8.0/V1.CloneContext)\n- [0.7.0](/php/docs/reference/cloud-sql-admin/0.7.0/V1.CloneContext)\n- [0.6.0](/php/docs/reference/cloud-sql-admin/0.6.0/V1.CloneContext)\n- [0.5.0](/php/docs/reference/cloud-sql-admin/0.5.0/V1.CloneContext)\n- [0.4.1](/php/docs/reference/cloud-sql-admin/0.4.1/V1.CloneContext)\n- [0.3.1](/php/docs/reference/cloud-sql-admin/0.3.1/V1.CloneContext)\n- [0.2.12](/php/docs/reference/cloud-sql-admin/0.2.12/V1.CloneContext) \nReference documentation and code samples for the Google Cloud Sql Admin V1 Client class CloneContext.\n\nDatabase instance clone context.\n\nGenerated from protobuf message `google.cloud.sql.v1.CloneContext`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Sql \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getKind\n\nThis is always `sql#cloneContext`.\n\n### setKind\n\nThis is always `sql#cloneContext`.\n\n### getPitrTimestampMs\n\nReserved for future use.\n\n### setPitrTimestampMs\n\nReserved for future use.\n\n### getDestinationInstanceName\n\nName of the Cloud SQL instance to be created as a clone.\n\n### setDestinationInstanceName\n\nName of the Cloud SQL instance to be created as a clone.\n\n### getBinLogCoordinates\n\nBinary log coordinates, if specified, identify the position up to which the\nsource instance is cloned. If not specified, the source instance is\ncloned up to the most recent binary log coordinates.\n\n### hasBinLogCoordinates\n\n### clearBinLogCoordinates\n\n### setBinLogCoordinates\n\nBinary log coordinates, if specified, identify the position up to which the\nsource instance is cloned. If not specified, the source instance is\ncloned up to the most recent binary log coordinates.\n\n### getPointInTime\n\nTimestamp, if specified, identifies the time to which the source instance\nis cloned.\n\n### hasPointInTime\n\n### clearPointInTime\n\n### setPointInTime\n\nTimestamp, if specified, identifies the time to which the source instance\nis cloned.\n\n### getAllocatedIpRange\n\nThe name of the allocated ip range for the private ip Cloud SQL instance.\n\nFor example: \"google-managed-services-default\". If set, the cloned instance\nip will be created in the allocated range. The range name must comply with\n[RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name\nmust be 1-63 characters long and match the regular expression\n[a-z](/php/docs/reference/cloud-sql-admin/latest/[-a-z0-9]*[a-z0-9])?.\nReserved for future use.\n\n### setAllocatedIpRange\n\nThe name of the allocated ip range for the private ip Cloud SQL instance.\n\nFor example: \"google-managed-services-default\". If set, the cloned instance\nip will be created in the allocated range. The range name must comply with\n[RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name\nmust be 1-63 characters long and match the regular expression\n[a-z](/php/docs/reference/cloud-sql-admin/latest/[-a-z0-9]*[a-z0-9])?.\nReserved for future use.\n\n### getDatabaseNames\n\n(SQL Server only) Clone only the specified databases from the source\ninstance. Clone all databases if empty.\n\n### setDatabaseNames\n\n(SQL Server only) Clone only the specified databases from the source\ninstance. Clone all databases if empty.\n\n### getPreferredZone\n\nOptional. Copy clone and point-in-time recovery clone of an instance to the\nspecified zone. If no zone is specified, clone to the same primary zone as\nthe source instance. This field applies to all DB types.\n\n### hasPreferredZone\n\n### clearPreferredZone\n\n### setPreferredZone\n\nOptional. Copy clone and point-in-time recovery clone of an instance to the\nspecified zone. If no zone is specified, clone to the same primary zone as\nthe source instance. This field applies to all DB types."]]