You can call the RebuildDBInstance operation to rebuild the secondary instance of a primary ApsaraDB RDS instance in a dedicated cluster.
Operation Description
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?
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rds:RebuildDBInstance | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
DedicatedHostGroupId | string | Yes | The ID of the dedicated cluster. You can call the DescribeDedicatedHostGroups operation to query the IDs of dedicated clusters. | dhg-4nxxxxxxx |
DBInstanceId | string | Yes | The ID of the primary instance. | rm-uf6wjk5xxxxxxx |
DedicatedHostId | string | No | The ID of the host on which the system rebuilds the secondary instance. NoteIf 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. | i-bpxxxxxxx |
RebuildNodeType | string | No | The role of the secondary instance that you want to rebuild. Valid values:
| FOLLOWER |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "355DA57C-8CC4-40AB-B3F8-B684BA32EB9E",
"TaskId": 208676661,
"MigrationId": 3298015
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | InsufficientResourceCapacity | No host is available for the requested instance. | The specified zone does not have sufficient resources. |
For a list of error codes, visit the Service error codes.