Migrates an ApsaraDB Tair (Redis OSS-Compatible) instance to another zone in the same region.
Operation description
Before you call this operation, you must release the public endpoint. For more information, see Migrate an instance across zones.
If the instance was switched from the classic network to a VPC and retains the classic network endpoint, you must wait until the classic network endpoint expires and is released before you can migrate the instance across zones.
After the migration, the endpoint of the instance remains unchanged, but the virtual IP address (VIP) changes. Use the endpoint instead of the VIP to connect to the instance in your business applications.
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 instance ID. |
r-bp1zxszhcgatnx**** |
| ZoneId |
string |
Yes |
The ID of the destination primary zone. You can call the DescribeZones operation to query the zone ID. |
cn-hangzhou-g |
| VSwitchId |
string |
No |
The vSwitch ID. Note
|
vsw-bp1e7clcw529l773d**** |
| EffectiveTime |
string |
No |
The time when the database switchover is performed after data migration. Valid values:
Note
Default value: Immediately. Valid values:
|
Immediately |
| SecondaryZoneId |
string |
No |
The ID of the destination secondary zone. You can call the DescribeZones operation to query the zone ID. Note
If you specify this parameter, the primary and secondary data nodes are distributed across different zones. This implements cross-zone disaster recovery and tolerates data center-level failures. |
cn-hangzhou-h |
| ReplicaCount |
integer |
No |
The number of secondary nodes in the primary zone. Note
|
1 |
| SlaveReplicaCount |
integer |
No |
The number of secondary nodes in the secondary zone. |
1 |
| ReadOnlyCount |
integer |
No |
The number of read-only nodes in the primary zone. Note
|
1 |
| SlaveReadOnlyCount |
integer |
No |
The number of read-only nodes in the secondary zone. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
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.