Switches over the primary and secondary clusters in a global database network (GDN).


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SwitchOverGlobalDatabaseNetwork

The operation that you want to perform. Set the value to SwitchOverGlobalDatabaseNetwork.

RegionId String No cn-qingdao

The region ID of the cluster.

DBClusterId String No pc-wz9fb5nn44u1d****

The ID of the cluster that will become the primary cluster in the GDN.

You can call the DescribeGlobalDatabaseNetwork operation to query the ID of the cluster in the GDN.

GDNId String Yes gdn-bp1fttxsrmv*****

The ID of the GDN.

Forced Boolean No false

Specifies whether to forcibly switch over the primary and secondary clusters in the GDN. Valid values:

  • true
  • false
ResourceGroupId String No rg-************

The ID of the resource group.

Response parameters

Parameter Type Example Description
RequestId String 67F2E75F-AE67-4FB2-821F-A81237EACD15

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "67F2E75F-AE67-4FB2-821F-A81237EACD15"

Error codes

HTTP status code Error code Error message Description
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified cluster ID does not exist in the current record.

For a list of error codes, see Service error codes.