You can call this operation to migrate an ApsaraDB for Redis instance to another zone in the same region.

For more information about how to perform the corresponding operation in the console, see Migrate an instance across zones.

  • If the network type of an instance is switched from the classic network to the Virtual Private Cloud (VPC) network and the endpoint of the classic network is kept, you can migrate the instance across zones only after the endpoint of the classic network expires and is released.
  • After data migration, endpoints of an instance are not changed, but the virtual IP address (VIP) are changed. We recommend that you use the endpoint instead of the VIP to connect to an instance.


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 Yes MigrateToOtherZone

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

DBInstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance.

ZoneId String Yes cn-hangzhou-g

The ID of the target zone. You can call the DescribeZones operation to query the zone ID.

RegionId String No cn-hangzhou

The ID of the region. You can call the DescribeRegions operation to query available regions.

VSwitchId String No vsw-sdrxxxxxxxxxxxxxxxxxx

The ID of the VSwitch.

  • The VSwitch must be deployed in the zone specified by the ZoneId parameter.
  • If the network type of the instance is VPC, you must specify this parameter.
EffectiveTime String No Immediately

Specifies the time when the database is switched after data migration. Valid values:

  • Immediately: switched immediately after data migration.
  • MaintainTime: switched within the maintenance period.
Note Default value: Immediately.

Response parameters

Parameter Type Example Description
RequestId String 29B0BF34-D069-4495-92C7-FA6D94528A9E

The ID of the request.


Sample requests
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

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