Replaces a host in an ApsaraDB for MyBase dedicated cluster.

If you specify the manual host replacement policy when you create a 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 check the status of your host based on the value of the HostStatus response parameter.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No ReplaceDedicatedHost

The operation that you want to perform. Set the value to ReplaceDedicatedHost.

DedicatedHostId String Yes ch-bp10a5id3boqi****

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

FailoverMode String Yes MaintainTime

The switchover configuration for the primary instance on the host. Valid values:

  • MaintainTime: This is the default value. Within a maintenance window, the primary instance is migrated to a healthy host in the same dedicated cluster and functions as a secondary instance of the healthy host. Then, the system replaces the faulty host. This ensures service continuity.
  • Immediate: The system immediately replaces the host.
RegionId String No cn-hangzhou

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

Response parameters

Parameter Type Example Description
DedicatedHostId String ch-bp10a5id3boqi****

The ID of the host that is created in the specified dedicated cluster.

RequestId String D6E068C3-25BC-455A-85FE-45F0B22EDSD8

The ID of the request.

TaskId Integer 10254125

The ID of the task.

Examples

Sample requests

http(s)://cddc.aliyuncs.com/?Action=ReplaceDedicatedHost
&DedicatedHostId=dhg-h5i4p331f509****
&FailoverMode=MaintainTime
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ReplaceDedicatedHostReponse>
  <DedicatedHostId> dhg-6w7q18iwt5jo****</DedicatedHostId>
  <TaskId>10254125</TaskId>
  <RequestId>D6E068C3-25BC-455A-85FE-45F0B22EDSD8</RequestId>
</ReplaceDedicatedHostReponse>

JSON format

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

Error codes

For a list of error codes, visit the API Error Center.