You can call this operation to change the primary zone of an Apsara PolarDB cluster.

Debugging

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-xxxxxxxxxx

The ID of the Apsara PolarDB cluster.

ZoneId String Yes cn-hangzhou-g

The ID of the target primary zone, such as cn-hangzhou-g.

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

The ID of the VSwitch.

Response parameters

Parameter Type Example Description
RequestId String E056BF3D-xxxx-xxxx-xxxx-xxxxxxxxxxxx

The ID of the request.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/? Action=ModifyDBClusterPrimaryZone
&DBClusterId=pc-xxxxxxxxxx
&ZoneId=cn-hangzhou-g
&<Common request parameters>

Sample success responses

XML format

<RequestId>E056BF3D-xxxx-xxxx-xxxx-xxxxxxxxxxxx</RequestId>

JSON format

{
  "RequestId": "E056BF3D-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Error codes

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