All Products
Search
Document Center

Elastic Compute Service:CreateDedicatedHostCluster

Last Updated:Oct 09, 2024

Creates a dedicated host cluster. When you call this operation, you can specify parameters, such as ResourceGroupId, DedicatedHostClusterName, and ZoneId, in the request.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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 ID of the region in which to create the dedicated host cluster. 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. If the request fails the dry run, 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 to add to the dedicated host cluster.

objectNo

The tags to add to the dedicated host cluster.

KeystringNo

The key of tag N to add to the dedicated host cluster. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun.

TestKey
ValuestringNo

The value of tag N to add to the dedicated host cluster. Valid values of N: 1 to 20. The tag value cannot be an empty string. The tag value can be up to 64 characters in length and cannot contain http:// or https://.

TestValue
ResourceGroupIdstringNo

The ID of the resource group to which to assign the dedicated host cluster.

rg-bp67acfmxazb4p****
ZoneIdstringYes

The ID of the zone in which to create the dedicated host cluster. You can call the DescribeZones operation to query the most recent zone list.

cn-hangzhou-f
DedicatedHostClusterNamestringNo

The name of the dedicated host cluster. The name 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 dedicated host cluster. The description 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 dedicated host cluster.

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
2023-06-13The Error code has changedView Change Details