All Products
Search
Document Center

ApsaraDB RDS:RebuildDBInstance

Last Updated:Jan 16, 2024

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Debug

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.
OperationAccess levelResource typeCondition keyAssociated operation
rds:RebuildDBInstanceWRITE
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

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

cn-hangzhou
DedicatedHostGroupIdstringYes

The dedicated cluster ID. You can call the DescribeDedicatedHostGroups operation to query the dedicated cluster ID.

dhg-4nxxxxxxx
DBInstanceIdstringYes

The instance ID.

rm-uf6wjk5xxxxxxx
DedicatedHostIdstringNo

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 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.
i-bpxxxxxxx
RebuildNodeTypestringNo

The role of the secondary instance that you want to rebuild. Valid values:

  • FOLLOWER: secondary instance
  • LOG: logger instance
FOLLOWER

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

355DA57C-8CC4-40AB-B3F8-B684BA32EB9E
TaskIdinteger

The task ID.

208676661
MigrationIdinteger

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.

3298015

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
404InsufficientResourceCapacityNo 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.

Change history

Change timeSummary of changesOperation
No change history