Migrates a Tair (Redis OSS-compatible) instance to another zone in the same region.
Operation description
Before you call this operation, release the public endpoint of the instance (if any). Migrate an instance across zones.
-
If the instance was switched from classic network to VPC and the classic network endpoint is retained, you can migrate zones only after the classic network endpoint expires and is released.
-
After migration, the endpoint remains unchanged but the VIP changes. Use the endpoint, not the VIP, to connect to the instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:MigrateToOtherZone |
update |
*DBInstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The ID of the Tair (Redis OSS-compatible) instance. |
r-bp1zxszhcgatnx**** |
| ZoneId |
string |
Yes |
The ID of the destination primary zone. Call DescribeZones to query zone IDs. |
cn-hangzhou-g |
| VSwitchId |
string |
No |
The ID of the vSwitch. Note
|
vsw-bp1e7clcw529l773d**** |
| EffectiveTime |
string |
No |
When to switch the database after migration. Valid values:
Note
Default value: Immediately. |
Immediately |
| SecondaryZoneId |
string |
No |
The ID of the destination secondary zone. Call DescribeZones to query zone IDs. Note
If specified, the master and replica nodes are deployed in different zones, enabling cross-zone disaster recovery. |
cn-hangzhou-h |
| ReplicaCount |
integer |
No |
The number of replica nodes in the primary zone. Note
|
1 |
| SlaveReplicaCount |
integer |
No |
The number of replica nodes in the secondary zone. |
1 |
| ReadOnlyCount |
integer |
No |
The number of read replicas in the primary zone. Note
|
1 |
| SlaveReadOnlyCount |
integer |
No |
The number of read replicas in the secondary zone. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
29B0BF34-D069-4495-92C7-FA6D9452**** |
Examples
Success response
JSON format
{
"RequestId": "29B0BF34-D069-4495-92C7-FA6D9452****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NetworkType.NotSupport | Specified network type does not support this operation. | The operation cannot be performed on an instance that has a public endpoint or a private endpoint. Release the endpoint and try again. |
| 400 | InstanceStatus.NotSupport | Instance status does not support this operation. | The error message returned because the operation is not supported while the instance is in the current state. |
| 400 | MissingSwitchId | VSwitchId is mandatory for this action. | |
| 400 | IzNotSupportVpcError | Specify zone not support VPC. | |
| 400 | InvalidReginAvzNotFound | Specified user does not find the region and zone. | |
| 400 | ClusterNotSupport | The Specified cluster does not support. | |
| 400 | InvalidVSwitchId.Mismatch | The Specified vSwitchId does not matched VPC. | |
| 400 | InvalidIzNo.NotSupported | The Specified Zone does not supported. | |
| 500 | VpcServiceError | Invoke VPC service failed. | |
| 500 | ZoneMigrationError.StillingRunning | Zone migration task is still running. | |
| 404 | DBInstanceNotFound | Specified instance does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.