Migrates an ApsaraDB for Redis instance to another zone in the same region.

For more information about how to migrate an instance across zones in the ApsaraDB for Redis console, see Migrate an instance across zones.

  • If the network type of an ApsaraDB for Redis instance is switched from classic network to Virtual Private Cloud (VPC), and the endpoint of the classic network is retained, you can migrate the instance across zones only after the classic network endpoint is released upon expiration.
  • After the data is migrated, the endpoint of an instance remains unchanged. However, the virtual IP address (VIP) is changed. We recommend that you use the endpoint instead of the VIP to connect to the 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-bp1zxszhcgatnx****

The ID of the ApsaraDB for Redis instance.

ZoneId String Yes cn-hangzhou-g

The ID of the destination primary zone. You can call the DescribeZones operation to query zone IDs.

RegionId String No cn-hangzhou

The region ID of the ApsaraDB for Redis instance.

VSwitchId String No vsw-bp1e7clcw529l773d****

The ID of the vSwitch.

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

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

  • Immediately: immediately switched after the data is migrated.
  • MaintainTime: switched within the maintenance window.
Note Default value: Immediately.
SecondaryZoneId String No cn-hangzhou-h

The ID of the destination secondary zone. You can call the DescribeZones operation to query zone IDs.

Note You can specify this parameter to deploy the master node and replica node in different zones to implement zone-disaster recovery. This helps withstand data center-level breakdowns.

Response parameters

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

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

	"RequestId": "29B0BF34-D069-4495-92C7-FA6D9452****"

Error codes

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