Verify the GTID consistency for demote operation. Default value:True. Setting this flag tofalseenables you to bypass the GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues.
↳ master_instance_name
string
The name of the instance which will act as on-premises primary instance in the replication setup.
Configuration specific to read-replicas replicating from the on-premises primary instance.
↳ skip_replication_setup
bool
Flag to skip replication setup on the instance.
getKind
This is alwayssql#demoteMasterContext.
Returns
Type
Description
string
setKind
This is alwayssql#demoteMasterContext.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getVerifyGtidConsistency
Verify the GTID consistency for demote operation. Default value:True. Setting this flag tofalseenables you to bypass the GTID
consistency check between on-premises primary instance and Cloud SQL
instance during the demotion operation but also exposes you to the risk of
future replication failures. Change the value only if you know the reason
for the GTID divergence and are confident that doing so will not cause any
replication issues.
Returns the unboxed value fromgetVerifyGtidConsistency()
Verify the GTID consistency for demote operation. Default value:True. Setting this flag tofalseenables you to bypass the GTID
consistency check between on-premises primary instance and Cloud SQL
instance during the demotion operation but also exposes you to the risk of
future replication failures. Change the value only if you know the reason
for the GTID divergence and are confident that doing so will not cause any
replication issues.
Returns
Type
Description
bool|null
setVerifyGtidConsistency
Verify the GTID consistency for demote operation. Default value:True. Setting this flag tofalseenables you to bypass the GTID
consistency check between on-premises primary instance and Cloud SQL
instance during the demotion operation but also exposes you to the risk of
future replication failures. Change the value only if you know the reason
for the GTID divergence and are confident that doing so will not cause any
replication issues.
Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
Verify the GTID consistency for demote operation. Default value:True. Setting this flag tofalseenables you to bypass the GTID
consistency check between on-premises primary instance and Cloud SQL
instance during the demotion operation but also exposes you to the risk of
future replication failures. Change the value only if you know the reason
for the GTID divergence and are confident that doing so will not cause any
replication issues.
Parameter
Name
Description
var
bool|null
Returns
Type
Description
$this
getMasterInstanceName
The name of the instance which will act as on-premises primary instance
in the replication setup.
Returns
Type
Description
string
setMasterInstanceName
The name of the instance which will act as on-premises primary instance
in the replication setup.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getReplicaConfiguration
Configuration specific to read-replicas replicating from the on-premises
primary instance.
[[["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 DemoteMasterContext (1.2.6)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.6 (latest)](/php/docs/reference/cloud-sql-admin/latest/V1.DemoteMasterContext)\n- [1.2.5](/php/docs/reference/cloud-sql-admin/1.2.5/V1.DemoteMasterContext)\n- [1.1.0](/php/docs/reference/cloud-sql-admin/1.1.0/V1.DemoteMasterContext)\n- [1.0.0](/php/docs/reference/cloud-sql-admin/1.0.0/V1.DemoteMasterContext)\n- [0.19.0](/php/docs/reference/cloud-sql-admin/0.19.0/V1.DemoteMasterContext)\n- [0.18.0](/php/docs/reference/cloud-sql-admin/0.18.0/V1.DemoteMasterContext)\n- [0.17.1](/php/docs/reference/cloud-sql-admin/0.17.1/V1.DemoteMasterContext)\n- [0.16.1](/php/docs/reference/cloud-sql-admin/0.16.1/V1.DemoteMasterContext)\n- [0.12.0](/php/docs/reference/cloud-sql-admin/0.12.0/V1.DemoteMasterContext)\n- [0.11.0](/php/docs/reference/cloud-sql-admin/0.11.0/V1.DemoteMasterContext)\n- [0.10.0](/php/docs/reference/cloud-sql-admin/0.10.0/V1.DemoteMasterContext)\n- [0.9.0](/php/docs/reference/cloud-sql-admin/0.9.0/V1.DemoteMasterContext)\n- [0.8.0](/php/docs/reference/cloud-sql-admin/0.8.0/V1.DemoteMasterContext)\n- [0.7.0](/php/docs/reference/cloud-sql-admin/0.7.0/V1.DemoteMasterContext)\n- [0.6.0](/php/docs/reference/cloud-sql-admin/0.6.0/V1.DemoteMasterContext)\n- [0.5.0](/php/docs/reference/cloud-sql-admin/0.5.0/V1.DemoteMasterContext)\n- [0.4.1](/php/docs/reference/cloud-sql-admin/0.4.1/V1.DemoteMasterContext)\n- [0.3.1](/php/docs/reference/cloud-sql-admin/0.3.1/V1.DemoteMasterContext)\n- [0.2.12](/php/docs/reference/cloud-sql-admin/0.2.12/V1.DemoteMasterContext) \nReference documentation and code samples for the Google Cloud Sql Admin V1 Client class DemoteMasterContext.\n\nDatabase instance demote primary instance context.\n\nGenerated from protobuf message `google.cloud.sql.v1.DemoteMasterContext`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Sql \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getKind\n\nThis is always `sql#demoteMasterContext`.\n\n### setKind\n\nThis is always `sql#demoteMasterContext`.\n\n### getVerifyGtidConsistency\n\nVerify the GTID consistency for demote operation. Default value:\n`True`. Setting this flag to `false` enables you to bypass the GTID\nconsistency check between on-premises primary instance and Cloud SQL\ninstance during the demotion operation but also exposes you to the risk of\nfuture replication failures. Change the value only if you know the reason\nfor the GTID divergence and are confident that doing so will not cause any\nreplication issues.\n\n### hasVerifyGtidConsistency\n\n### clearVerifyGtidConsistency\n\n### getVerifyGtidConsistencyUnwrapped\n\nReturns the unboxed value from `getVerifyGtidConsistency()`\n\nVerify the GTID consistency for demote operation. Default value:\n`True`. Setting this flag to `false` enables you to bypass the GTID\nconsistency check between on-premises primary instance and Cloud SQL\ninstance during the demotion operation but also exposes you to the risk of\nfuture replication failures. Change the value only if you know the reason\nfor the GTID divergence and are confident that doing so will not cause any\nreplication issues.\n\n### setVerifyGtidConsistency\n\nVerify the GTID consistency for demote operation. Default value:\n`True`. Setting this flag to `false` enables you to bypass the GTID\nconsistency check between on-premises primary instance and Cloud SQL\ninstance during the demotion operation but also exposes you to the risk of\nfuture replication failures. Change the value only if you know the reason\nfor the GTID divergence and are confident that doing so will not cause any\nreplication issues.\n\n### setVerifyGtidConsistencyUnwrapped\n\nSets the field by wrapping a primitive type in a Google\\\\Protobuf\\\\BoolValue object.\n\nVerify the GTID consistency for demote operation. Default value:\n`True`. Setting this flag to `false` enables you to bypass the GTID\nconsistency check between on-premises primary instance and Cloud SQL\ninstance during the demotion operation but also exposes you to the risk of\nfuture replication failures. Change the value only if you know the reason\nfor the GTID divergence and are confident that doing so will not cause any\nreplication issues.\n\n### getMasterInstanceName\n\nThe name of the instance which will act as on-premises primary instance\nin the replication setup.\n\n### setMasterInstanceName\n\nThe name of the instance which will act as on-premises primary instance\nin the replication setup.\n\n### getReplicaConfiguration\n\nConfiguration specific to read-replicas replicating from the on-premises\nprimary instance.\n\n### hasReplicaConfiguration\n\n### clearReplicaConfiguration\n\n### setReplicaConfiguration\n\nConfiguration specific to read-replicas replicating from the on-premises\nprimary instance.\n\n### getSkipReplicationSetup\n\nFlag to skip replication setup on the instance.\n\n### setSkipReplicationSetup\n\nFlag to skip replication setup on the instance."]]