All Products
Search
Document Center

Elastic Compute Service:CreateDedicatedHostCluster

Last Updated:Mar 10, 2025

Creates a dedicated host group.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:CreateDedicatedHostClustercreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the host group. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks the request for potential issues, including invalid AccessKey pairs, unauthorized Resource Access Management (RAM) users, and missing parameter values. Otherwise, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • false: performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.

Default value: false.

false
Tagarray<object>No

The tags of the host group.

objectNo

The tags of the host group.

KeystringNo

The tag key. Valid values of N: 1 to 20. The tag key cannot be an empty string. It can be no more than 64 characters in length, and can neither contain http:// or https:// nor start with acs: or aliyun.

TestKey
ValuestringNo

The tag value. Valid values of N: 1 to 20. The tag value cannot be an empty string. It can be no more than 64 characters in length and cannot contain http:// or https://.

TestValue
ResourceGroupIdstringNo

The resource group ID of the host group.

rg-bp67acfmxazb4p****
ZoneIdstringYes

The zone ID of the host group. You can call the DescribeZones operation to query the most recent zone list.

cn-hangzhou-f
DedicatedHostClusterNamestringNo

The name of the host group. It must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

This parameter is left empty by default.

myDDHCluster
DescriptionstringNo

The description of the host group. It must be 2 to 256 characters in length, and cannot start with http:// or https://.

This parameter is left empty by default.

This-is-my-DDHCluster

Response parameters

ParameterTypeDescriptionExample
object
DedicatedHostClusterIdstring

The ID of the host group.

dc-bp12wlf6bw0vz9v2****
RequestIdstring

The request ID.

E2A664A6-2933-4C64-88AE-5033D003****

Examples

Sample success responses

JSONformat

{
  "DedicatedHostClusterId": "dc-bp12wlf6bw0vz9v2****",
  "RequestId": "E2A664A6-2933-4C64-88AE-5033D003****"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidTagKey.MalformedThe specified Tag.n.Key is not valid.The specified Tag.N.Key parameter is invalid.
400InvalidTagValue.MalformedThe specified Tag.n.Value is not valid.The specified tag value is invalid.
400Duplicate.TagKeyThe Tag.N.Key contain duplicate key.The specified tag key already exists. Tag keys must be unique.
404InvalidResourceGroup.NotFoundThe ResourceGroup provided does not exist in our records.The specified resource group does not exist.
404InvalidZone.NotFoundThe ZoneId provided does not exist in our records.The specified zone ID does not exist.
404QuotaExceed.RegionThe maximum region quota of Dedicated Host Cluster has exceeded.-
404QuotaExceed.ZoneThe maximum zone quota of Dedicated Host Cluster has exceeded.-
404InvalidParam.ZoneThe specified zone not match region.-
404InvalidRegionId.NotFoundThe regionId provided does not exist in our records.The RegionId provided does not exist

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-02-20API Description Update. The Error code has changedView Change Details
2023-06-13The Error code has changedView Change Details