You can call the RebuildDBInstance operation to rebuild the secondary instance of a primary ApsaraDB RDS instance in a 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 MyBase?
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | Rebuild instance |
The operation that you want to perform. Set the value to RebuildDBInstance. |
DedicatedHostGroupId | String | Yes | dhg-4nxxxxxxx |
The ID of the dedicated cluster. You can call the DescribeDedicatedHostGroups operation to query the IDs of dedicated clusters. |
DBInstanceId | String | Yes | rm-uf6wjk5xxxxxxx |
The ID of the primary instance. |
DedicatedHostId | String | No | i-bpxxxxxxx |
The ID of the host on 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 on which the secondary instance resides. If the remaining
storage space of the original host is insufficient, the system rebuilds the secondary
instance on a host on which 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 instance. You can call the DescribeRegions operation to query the most recent region list. |
RebuildNodeType | String | No | FOLLOWER |
The role of the secondary instance that you want to rebuild. Valid values:
|
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
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | InsufficientResourceCapacity | No host is available for the requested instance. | The error message returned because no suitable hosts can be found due to insufficient resources in the dedicated cluster. |
For a list of error codes, visit the API Error Center.