All Products
Search
Document Center

ApsaraDB RDS:RebuildDBInstance

Last Updated:May 29, 2023

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

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

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

cn-hangzhou
DedicatedHostGroupIdstringYes

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

dhg-4nxxxxxxx
DBInstanceIdstringYes

The ID of the primary instance.

rm-uf6wjk5xxxxxxx
DedicatedHostIdstringNo

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
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 ID of the request.

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

The ID of the task.

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.