You can call this operation to migrate an instance from one zone to another.

For example, if Instance 1 is located in zone cn-hangzhou-a of China (Hangzhou), you can call this operation to migrate the instance to zone cn-hangzhou-b of China (Hangzhou).

Note In cross-zone migration, instances must be migrated within the same region. For example, instances in a zone of China (Hangzhou) cannot be migrated to zones of China (Qingdao).

Debugging

You can use OpenAPI Explorer to perform debugging. OpenAPI Explorer allows you to perform various operations to simplify API usage. For example, you can retrieve APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String Yes MigrateToOtherZone

The operation that you want to perform. Set this parameter to MigrateToOtherZone.

DBInstanceId String Yes rm-uf6wjk5xxxxxxxxxx

The ID of the instance.

ZoneId String Yes cn-hangzhou-b

The ID of the destination zone. You can call the DescribeRegions API operation to to view the latest zones.

AccessKeyId String No LTAIfCxxxxxxx

The AccessKey ID that Alibaba Cloud issues to a user for service access.

VSwitchId String No vsw-uf6adz52c2pxxxxxxx

The ID of the VSwitch.

EffectiveTime String No Immediate

Effective time. Valid values:

  • Immediate: The migration takes effect immediately.
  • MaintainTime: The migration takes effect during the maintenance period. For more information about the maintenance period, see ModifyDBInstanceMaintainTime.

Default value: Immediate

Response parameters

Parameter Type Example Description
RequestId String 65BDA532-28AF-4122-AA39-B382721EEE64

The ID of the request.

Examples

Sample requests


http(s)://rds.aliyuncs.com/? Action=MigrateToOtherZone
&DBInstanceId=rm-uf6wjk5xxxxxxxxxx
&ZoneId=cn-hangzhou-b 
&<Common request parameters>

Successful response examples

XML format

<MigrateToOtherZoneResponse>
	  <RequestId> 65BDA532-28AF-4122-AA39-B382721EEE64</RequestId></MigrateToOtherZoneResponse>

JSON format

{
	"RequestId":" 65BDA532-28AF-4122-AA39-B382721EEE64"
}

Error codes

HTTP status code Error code Error message Description
400 IncorrectDBInstanceLockMode.ValueNotSupported The Current DB instance lock mode does not support this operation. The error message returned when the instance lock mode does not support this operation.
403 OperationDenied.OutofUsage The resource is out of usage. The error message returned when the selected zone does not have sufficient resources. Select another zone.

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