You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
proprietary host
ModifyDedicatedHostAttribute - Modifies DDH attributes
Copy page
Download PDF
ModifyDedicatedHostAttribute - Modifies DDH attributes
Call the ModifyDedicatedHostAttribute operation to modify attributes of a DDH, such as the name, description, CPU oversubscription ratio, automatic deployment setting, and automatic migration.​
Request description​
  • When you call this operation, if you do not pass in optional parameters, the original configuration is retained.​
  • To modify the CPU overcommitment ratio, all instances on the DDH must be in the Stopped state. You can stop instances by calling the StopInstances operation. Modifying the CPU oversubscription ratio does not affect the running status of the host.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the request parameters specific to this operation and some common parameters are listed below. For more information, please refer to Common parameters.​
Action string required Sample value: ModifyDedicatedHostAttribute​
The action that you want to perform. Value: ModifyDedicatedHostAttribute.​
​
Version string requiredSample value: 2020-04-01​
The API version. Valid value: 2020-04-01.​
​
AutoPlacement string Optional Sample value: Off​
Specifies whether to add the DDH to the automatic deployment pool. Valid values:​
  • On: Adds the DDH to the automatic deployment pool. When you create an instance without specifying a DDH, the system will automatically select a suitable DDH from this pool for instance deployment.​
  • Off (default): Does not add the DDH to the automatic deployment pool. You need to manually deploy the instance on a DDH by specifying the DDH when creating the instance.​
For the operations of creating an instance, refer to RunInstances.​
​
ClientToken string Optional Sample value: 23fa21A8823nfasd7f****​
The ClientToken is used to ensure the request idempotency. You can use the client to automatically generate a token, but you must make sure that the token is unique among different requests. This prevents repeated actions due to multiple client retries when the call of the API operation times out or an internal server error occurs.​
Value: Only ASCII characters are supported. The length is no more than 64 ASCII characters.​
​
CpuOvercommitRatio double Optional Sample value: 4​
CPU oversubscription ratio, used to increase the available vCPUs of the DDH. The available vCPUs of a DDH = Number of physical CPU cores * 2 * CPU oversubscription ratio.​
  • Value range: 1–4.​
  • Default value: The maximum oversubscription ratio supported.​
​
DedicatedHostClusterId string Optional Sample value: dc-ycle6b76kgv2wrsm****​
The ID of the dedicated host cluster.​
You can call DescribeDedicatedHostClusters to query DDH clusters.​
​
DedicatedHostId string required Sample value: dh-ycje2rquioh9l3bn****​
Dedicated host ID.​
You can call DescribeDedicatedHosts to query DDH IDs.​
​
DedicatedHostName string Optional Sample value: dedicated-host-test​
The name of the DDH.​
  • Cannot start with a number, underscore "_", or hyphen "-".​
  • It can contain only Chinese characters, letters, digits, underscores (_), and hyphens (-).​
  • The length limit is 1 to 128 characters.​
  • Special characters are currently not supported.​
​
DedicatedHostRecovery string Optional Sample value: Off​
Specifies whether to enable automatic migration upon a DDH failure when the DDH enters the TempUnavailable (temporarily unavailable) state. Valid values:​
  • On: Enables automatic migration when the DDH fails. After this feature is enabled, when the DDH fails, instances will be automatically migrated to a healthy DDH.​
  • Off (default): Does not enable automatic migration when the DDH fails. You can call RedeployDedicatedHost to manually replace the host.​
​
Description string Optional Sample value: DDH for testing​
Description of the DDH. Default value: empty string.​
  • Start with a letter or Chinese character only.​
  • Only Chinese characters, letters, numbers, dots (.), spaces, underscores (_), hyphen (-), equal signs (=), English comma (,), Chinese comma (,), and Chinese period (。) are allowed.​
  • The length is limited to 255 characters.​
​
​
​
Response parameters​
This operation has no specific response parameters. For more information, refer to Response structure.​
Sample request​
​
GET /?Action=ModifyDedicatedHostAttribute&Version=2020-04-01&DedicatedHostId=dh-ycje2rquioh9l3bn****&DedicatedHostName=dedicated-host HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
Service: ecs​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "202307171606530C0899E572405719****",​
"Action": "ModifyDedicatedHostAttribute",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {}​
}​
​
Error code​
The table below lists the business-related error codes of the operation. For more information, refer to Common error codes.​
​
Status code​
Error code​
Error message​
Description​
400​
IdempotentParameterMismatch​
The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.​
The idempotent parameters are inconsistent.​
400​
InvalidArgument​
The specified argument is invalid.​
The specified parameter is invalid.​
400​
InvalidAutoPlacement.Malformed​
The specified AutoPlacement is malformed.​
The specified AutoPlacement value is invalid.​
400​
InvalidClientToken.Malformed​
The specified ClientToken is malformed.​
The specified ClientToken is invalid.​
400​
InvalidCpuOvercommitRatio.Malformed​
The specified CpuOvercommitRatio is malformed.​
The specified oversubscription ratio is invalid.​
400​
InvalidDedicatedHostName.Malformed​
The specified DedicatedHostName is malformed.​
The specified DedicatedHostName value is invalid.​
400​
InvalidDedicatedHostRecovery.Malformed​
The specified DedicatedHostRecovery is malformed.​
The specified DedicatedHostRecovery value is invalid.​
400​
InvalidDedicatedHostStatus.Unsupported​
The status of the specified dedicated host does not support this request.​
The dedicated host in current status does not support this action.​
400​
InvalidDescription.Malformed​
The specified Description is malformed.​
The specified description is invalid.​
400​
MissingParameter.DedicatedHostId​
The required parameter DedicatedHostId is not supplied.​
The parameter DedicatedHostId cannot be empty.​
404​
InvalidDedicatedHost.NotFound​
The specified dedicated host does not exist.​
The specified dedicated host does not exist.​
404​
InvalidDedicatedHostCluster.NotFound​
The specified dedicated host cluster does not exist.​
The specified dedicated host cluster does not exist.​
412​
IdempotentProcessing​
The request uses the same client token as a previous one that is still in process.​
The previous idempotent request is still in process. Please try again later.​
412​
InvalidDedicatedHostCluster.ZoneIdMismatch​
The zone of the specified dedicated host cluster does not match the dedicated host.​
The availability zone of the specified DDH cluster does not match that of the DDH.​
412​
OperationDenied.InstanceStatus​
Some instances on the dedicated host are not in the stopped status.​
The oversubscription ratio of the specified DDH cannot be modified because there are instances on it that are not in the Stopped state.​
500​
InternalError​
An internal error has occurred.​
An internal error occurred. Try again. If multiple attempts fail, submit a ticket.​
​
Last updated: 2026.01.16 19:04:50