Migrates a primary instance and its secondary instance to other hosts in the same dedicated cluster.

Dedicated clusters allow you to manage a number of instances at a time. You can create multiple dedicated clusters in a single region. Each dedicated cluster consists of multiple hosts. You can create multiple instances on each host. For more information, see What is ApsaraDB for MyBase?


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 MigrateDBInstance

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

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the primary instance.

DedicatedHostGroupId String Yes dhg-4nxxxxxxx

The ID of the dedicated cluster.

TargetDedicatedHostIdForMaster String Yes i-bpxxxxxxx1

The ID of the host to which you want to migrate the primary instance.

TargetDedicatedHostIdForSlave String Yes i-bpxxxxxxx2

The ID of the host to which you want to migrate the secondary instance.

RegionId String No cn-hangzhou

The region ID of the primary instance. You can call the DescribeRegions operation to query the most recent region list.

EffectiveTime String No MaintainTime

The time when you want the system to start the migration. Valid values:

  • Immediately: The system immediately starts the migration. This is the default value.
  • MaintainTime: The system starts the migration during the specified maintenance window.
  • Specified: The system starts the migration at the specified point in time.
SpecifiedTime String No 2019-10-21T10:00:00Z

The point in time when you want the system to start the migration. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note This parameter must be specified when you set the EffectiveTime parameter to Specified.
AccessKeyId String No LTAIfCxxxxxxx

The AccessKey ID provided to you by Alibaba Cloud.

Response parameters

Parameter Type Example Description
MigrationId Integer 2245016

The serial number of the task in the migration task queue. When the serial number becomes 0, the system starts the migration.

RequestId String 498AE8CA-8C81-4A01-AF37-2B902014ED30

The ID of the request.

TaskId Integer 108246861

The ID of the task.


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.