Restarts a host in an ApsaraDB for MyBase dedicated cluster.

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 RestartDedicatedHost

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

DedicatedHostId String Yes ch-bp10a5id3boqi****

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

FailoverMode String Yes MaintainTime

The failover policy for the primary instance on the host. Valid values:

  • MaintainTime: The system performs a failover within a maintenance window. The system waits for the primary instance on the host to be migrated to another host in the same dedicated cluster and function as a secondary instance. Then, the system restarts the host. This way, service continuity is ensured. This value is the default value.
  • Immediate: The system immediately restarts the host.
RegionId String No cn-hangzhou

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

ForceStop Boolean No false

Specifies whether to forcibly stop the host to restart it. Valid values:

  • true: The system forcibly restarts the host. If this value is used, the system powers off the host. This can result in the loss of cached data that is not written to storage. Exercise caution when you select this value.
  • false: The system restarts the host in a normal manner.
Note This parameter takes effect only for hosts that are created in MyBase for Redis dedicated clusters of the Enhanced Edition (Tair). Hosts that are created in ApsaraDB for MyBase dedicated clusters that run other database engines can be restarted only in a normal manner.

Response parameters

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

The ID of the host in the dedicated cluster.

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

The ID of the request.

TaskId Integer 10254125

The ID of the task.

Examples

Sample requests

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

Sample success responses

XML format

<RestartDedicatedHostReponse>
  <DedicatedHostId>ch-bp10a5id3boqi****</DedicatedHostId>
  <TaskId>10254125</TaskId>
  <RequestId>D6E068C3-25BC-455A-85FE-45F0B22EDSH</RequestId>
</RestartDedicatedHostReponse>

JSON format

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

Error codes

HTTP status code Error code Error message Description
403 InvalidAction.NotSupport The host status does not support the operation. The error message returned because the operation is not supported when the host is in the current state.

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