Changes the primary zone of a PolarDB cluster.


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 No ModifyDBClusterPrimaryZone

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

DBClusterId String Yes pc-**************

The ID of the cluster for which you want to change the primary zone.

ZoneId String Yes cn-hangzhou-g

The ID of the destination primary zone.

Note You can call the DescribeRegions operation to query available zones.
VSwitchId String No vsw-**************

The ID of the vSwitch in the destination zone.

  • This parameter is required if your cluster is a PolarDB for Oracle cluster or a PolarDB for PostgreSQL cluster.
  • If your cluster is a PolarDB for PostgreSQL cluster:
    • this parameter is optional if no vSwitches have been created in the destination zone. The default vSwitch is used.
    • this parameter is required if a vSwitch has been created in the destination zone.

Response parameters

Parameter Type Sample response Description
RequestId String ED12C6FF-3261-4571-AB57-3570F6******

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" : "ED12C6FF-3261-4571-AB57-3570F6******"

Error codes

HttpCode Error code Error message Description
400 ScheduleTaskExist The specified cluster already has a scheduled task. The error code returned because a different task is scheduled to run on the specified cluster.

For a list of error codes, visit the API Error Center.