Rebuilds the secondary instance of a primary RDS instance to another host 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?

Debugging

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 RebuildDBInstance

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

DedicatedHostGroupId String Yes dhg-4nxxxxxxx

The ID of the dedicated cluster.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the secondary instance.

DedicatedHostId String No i-bpxxxxxxx

The ID of the host to which the system rebuilds the secondary instance.

Note If you do not specify this parameter, the system preferentially rebuilds the secondary instance on the original host where the secondary instance resides. If the remaining storage space of the original host is insufficient, the system rebuilds the secondary instance on another host where the primary instance does not reside. If no suitable hosts are found, the system reports an error that indicates insufficient storage space.
RegionId String No cn-hangzhou

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

AccessKeyId String No LTAIfCxxxxxxxxxx

The AccessKey ID provided to you by Alibaba Cloud.

Response parameters

Parameter Type Example Description
MigrationId Integer 3298015

The serial number of the task in the rebuild task queue. When the serial number becomes 0, the system starts to rebuild the secondary instance.

RequestId String 355DA57C-8CC4-40AB-B3F8-B684BA32EB9E

The ID of the request.

TaskId Integer 208676661

The ID of the task.

Examples

Sample requests


http(s)://rds.aliyuncs.com/?Action=RebuildDBInstance
&DedicatedHostGroupId=dhg-4nxxxxxxx
&DedicatedHostId=i-bpxxxxxxx
&DBInstanceId=rm-uf6wjk5xxxxxxx
&<Common request parameters>

Sample success responses

XML format

<RebuildDBInstanceResponse>
  <MigrationId>3298015</MigrationId>
  <RequestId>355DA57C-8CC4-40AB-B3F8-B684BA32EB9E</RequestId>
  <TaskId>208676661</TaskId>
</RebuildDBInstanceResponse>

JSON format

{
	"MigrationId":3298015,
	"RequestId":"355DA57C-8CC4-40AB-B3F8-B684BA32EB9E",
	"TaskId":208676661
}

Error codes

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