Modifies some properties of a dedicated host, such as the name, description, and instance migration policy that is applied when the dedicated host fails.
Operation description
Description
- All the Elastic Compute Service (ECS) instances that are hosted on a dedicated host must be in the Stopped (
Stopped
) state before you can modify the CPU overcommit ratio of the dedicated host. - Modifications to the CPU overcommit ratio of a dedicated host do not affect the operation of the dedicated host. After the CPU overcommit ratio is modified, the number of allocated vCPUs on the dedicated host cannot exceed the new total number of vCPUs. Otherwise, ECS instances that use the excess vCPUs cannot start.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the dedicated host. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
DedicatedHostId | string | Yes | The ID of the dedicated host. | dh-bp165p6xk2tlw61e**** |
DedicatedHostName | string | No | The name of the dedicated host. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. The name can contain digits, letters, colons (:), underscores (_), and hyphens (-). | testDedicatedHostName |
Description | string | No | The description of the dedicated host. The description must be 2 to 256 characters in length and cannot start with | testDescription |
ActionOnMaintenance | string | No | The policy for migrating the instances deployed on the dedicated host when the dedicated host fails or needs to be repaired online. Valid values:
If the dedicated host has cloud disks attached, the default value is Migrate. If the dedicated host has local disks attached, the default value is Stop. | Migrate |
NetworkAttributes.SlbUdpTimeout | integer | No | The timeout period for a UDP session between a Server Load Balancer (SLB) instance and the dedicated host. Unit: seconds. Valid values: 15 to 310. | 60 |
NetworkAttributes.UdpTimeout | integer | No | The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid values: 15 to 310. | 60 |
AutoPlacement | string | No | Specifies whether to add the dedicated host to the resource pool for automatic deployment. If you do not specify the DedicatedHostId parameter when you create an instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. Valid values:
For information about automatic deployment, see Features . | on |
DedicatedHostClusterId | string | No | The ID of the dedicated host cluster to which the dedicated host belongs. | dc-bp165p6xk2tlw61e**** |
CpuOverCommitRatio | float | No | The CPU overcommit ratio. You can configure CPU overcommit ratios only for the following dedicated host types: g6s, c6s, and r6s. Valid values: 1 to 5. The CPU overcommit ratio affects the number of available vCPUs on a dedicated host. You can use the following formula to calculate the number of available vCPUs on a dedicated host: Number of available vCPUs = Number of physical CPU cores × 2 × CPU overcommit ratio. For example, the number of physical CPU cores on each g6s dedicated host is 52. If you change the CPU overcommit ratio of a g6s dedicated host to 4, the number of available vCPUs on the dedicated host is 416. For scenarios that have minimal requirements for CPU stability or where CPU load is not heavy, such as development and test environments, you can increase the number of available vCPUs on a dedicated host by increasing the CPU overcommit ratio. This way, you can deploy more ECS instances of the same specifications on the dedicated host and reduce the unit deployment cost. | 1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "2A4EA075-CB5B-41B7-B0EB-70D339F6****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidDedicatedHostName.Malformed | The specified parameter DedicatedHostName is not valid. | - |
400 | InvalidDescription.Malformed | The specified parameter Description is not valid. | The resource description is invalid. The description must be 2 to 256 characters in length and cannot start with http:// or https://. |
400 | InvalidParameter.SlbUdpTimeout | The specified value is invalid. | The specified SlbUdpTimeout parameter is invalid. |
400 | InvalidParameter.UdpTimeout | The specified value is invalid. | The specified UdpTimeout parameter is invalid. |
400 | InvalidDedicatedHostType.CpuOverCommitRatioNotSupported | %s | - |
400 | InvalidCpuOverCommitRatio.ValueNotSupported | %s | - |
403 | InvalidUser.Unauthorized | The user is not authorized | You are not authorized to perform this operation. |
404 | InvalidDedicatedHostId.NotFound | The specified DedicatedHostId does not exist. | - |
404 | InvalidDedicatedHostClusterId.NotFound | The specified DedicatedHostClusterId does not exist. | - |
404 | InvalidDedicatedHostClusterId.ExceedMaxSize | The specified Dedicated Host Cluster exceeded max capacity. | - |
404 | InvalidDedicatedHostClusterId.NotMatch | The specified DedicatedHostCluster does not match request. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2023-09-04 | The Error code has changed | see changesets | ||||||||
|