Upgrades host specifications.

After a host is created in a dedicated cluster, you can modify the specifications of the host based on your business requirements. The host specifications include the CPU and memory resources. For more information, see Upgrade host specifications.

Note When you upgrade the specifications of a host, the host restarts. The database instances that are running on the host also restart. For information about the impacts of a host restart, see Restart a host.

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 Yes ModifyDedicatedHostClass

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

DedicatedHostId String Yes ch-bp1fgj3kt7fsb****

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

RegionId String Yes cn-hangzhou

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

SwitchTime String Yes 2021-07-13T07:14:22Z

The time when you want to upgrade the specifications of the host. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note The SwitchTime parameter is required only if the SwitchTimeMode parameter is set to 2.
TargetClassCode String Yes rds.c6.x4large

The instance type to which you want the host to be upgraded. For more information, see Host specification details.

SwitchTimeMode String No 2

The execution mode that is used to upgrade host specifications. Valid values:

  • 0: Host specifications are immediately upgraded. This value is the default value.
  • 2: Host specifications are upgraded at the specified time.
    Note If you set this parameter to 2, you must also configure the SwitchTime parameter.

Response parameters

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

The ID of the host.

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

The ID of the request.

TaskId String 10254125

The ID of the task.

Examples

Sample requests

http(s)://cddc.aliyuncs.com/?Action=ModifyDedicatedHostClass
&DedicatedHostId=ch-bp1fgj3kt7fsb****
&SwitchTime=2020-10-16T16:30:19Z
&RegionId=cn-hangzhou
&TargetClassCode=rds.c6.x4large
&SwitchTimeMode=2
&<Common request parameters>

Sample success responses

XML format

<ModifyDedicatedHostClassReponse>
  <DedicatedHostId>ch-bp1fgj3kt7fsb****</DedicatedHostId>
  <TaskId>10254125</TaskId>
  <RequestId>D6E068C3-25BC-455A-85FE-45F0B22ESD12</RequestId>
</ModifyDedicatedHostClassReponse>

JSON format

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

Error codes

HttpCode Error code Error message Description
400 InvalidAction The specified action is not valid. The error message returned because the specified operation is invalid.

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