All Products
Search
Document Center

ApsaraDB for MyBase:ReplaceDedicatedHost

Last Updated:Mar 01, 2024

Replaces a host in a dedicated cluster.

Operation description

If you specify the manual host replacement policy when you create an ApsaraDB MyBase for MySQL dedicated cluster, you can call this operation to replace a faulty host in the dedicated cluster.

Note You can call the DescribeDedicatedHostAttribute operation to query the value of the HostStatus parameter.

Debugging

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

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The region ID of the host. You can call the DescribeDedicatedHostAttribute operation to query the region ID.

cn-hangzhou
DedicatedHostIdstringYes

The host ID. You can call the DescribeDedicatedHosts operation to query the host ID.

ch-bp10a5id3boqi****
FailoverModestringYes

The switchover method of the primary instance. Valid values:

  • MaintainTime (default): The system performs a switchover within a maintenance window. The system switches workloads from the primary instance on the host to the secondary instance on another host, and then restarts the current host. This prevents service interruptions.
  • Immediate: The system immediately restarts the host.
MaintainTime

Response parameters

ParameterTypeDescriptionExample
object
DedicatedHostIdstring

The ID of the host in the dedicated cluster.

ch-bp10a5id3boqi****
RequestIdstring

The request ID.

D6E068C3-25BC-455A-85FE-45F0B22EDSD8
TaskIdinteger

The task ID.

10254125

Examples

Sample success responses

JSONformat

{
  "DedicatedHostId": " ch-bp10a5id3boqi****",
  "RequestId": "D6E068C3-25BC-455A-85FE-45F0B22EDSD8",
  "TaskId": 10254125
}

Error codes

HTTP status codeError codeError message
404InvalidDedicatedHostId_NotFoundspecific DedicatedHostId not found

For a list of error codes, visit the Service error codes.