Changes the primary zone of a PolarDB cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:ModifyDBClusterPrimaryZone |
update |
*dbcluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The cluster ID. Note
Call the DescribeDBClusters operation to query the details of all clusters in a destination region, including their cluster IDs. |
pc-************** |
| ZoneId |
string |
Yes |
The ID of the new zone. Note
Call the DescribeRegions operation to query available zones. |
cn-hangzhou-g |
| ZoneType |
string |
No |
The type of the zone. Valid values:
|
Primary |
| VSwitchId |
string |
No |
The ID of the vSwitch in the destination zone. Note
|
vsw-************** |
| IsSwitchOverForDisaster |
string |
No |
Specifies whether to fail back to the original zone. Valid values:
|
false |
| PlannedStartTime |
string |
No |
The earliest time to start the scheduled task to change the zone. Specify the time in the Note
|
2021-01-14T09:00:00Z |
| PlannedEndTime |
string |
No |
The latest time to start the scheduled task. Specify the time in the Note
|
2021-01-14T09:30:00Z |
| FromTimeService |
boolean |
No |
Specifies whether to perform the zone change immediately or at a scheduled time. Valid values:
|
false |
| VPCId |
string |
No |
The ID of the virtual private cloud (VPC). |
vpc-********** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
ED12C6FF-3261-4571-AB57-3570F6****** |
Examples
Success response
JSON format
{
"RequestId": "ED12C6FF-3261-4571-AB57-3570F6******"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ScheduleTaskExist | The specified cluster already has a scheduled task. | The specified cluster already has a scheduled task. |
| 400 | InvalidZoneId.Malformed | The specified parameter ZoneId is not valid. | The specified ZoneId parameter is invalid. |
| 400 | InvalidZoneId.Same | The specified parameter ZoneId is same with origin zoneId. | The specified ZoneId is the same as the original ZoneId. |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | The request failed to be processed because unknown errors, exceptions, or failures have occurred. |
| 403 | ActionUnauthorized | The specified action is not available for you. | This operation cannot be performed. |
| 403 | OperationDenied.MutexLock | The operation is not permitted due to the mutex lock. | This operation cannot be performed because of a mutex. |
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | The specified DBClusterId parameter is invalid. |
| 404 | InsufficientResource | The specified target zone has insufficient resources. | The specified target zone has insufficient resources. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.