Creates a dedicated host cluster. When you call this operation, you can specify parameters, such as ResourceGroupId, DedicatedHostClusterName, and ZoneId, in the request.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ecs:CreateDedicatedHostCluster | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | 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 |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
Default value: false. | false |
Tag | array<object> | No | The tags to add to the dedicated host cluster. | |
object | No | The tags to add to the dedicated host cluster. | ||
Key | string | No | 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 | TestKey |
Value | string | No | 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 | TestValue |
ResourceGroupId | string | No | The ID of the resource group to which to assign the dedicated host cluster. | rg-bp67acfmxazb4p**** |
ZoneId | string | Yes | 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 |
DedicatedHostClusterName | string | No | 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 |
Description | string | No | The description of the dedicated host cluster. The description must be 2 to 256 characters in length and cannot start with This parameter is left empty by default. | This-is-my-DDHCluster |
Response parameters
Examples
Sample success responses
JSON
format
{
"DedicatedHostClusterId": "dc-bp12wlf6bw0vz9v2****",
"RequestId": "E2A664A6-2933-4C64-88AE-5033D003****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | The specified Tag.N.Key parameter is invalid. |
400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | The specified tag value is invalid. |
400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | The specified tag key already exists. Tag keys must be unique. |
404 | InvalidResourceGroup.NotFound | The ResourceGroup provided does not exist in our records. | The specified resource group does not exist. |
404 | InvalidZone.NotFound | The ZoneId provided does not exist in our records. | The specified zone ID does not exist. |
404 | QuotaExceed.Region | The maximum region quota of Dedicated Host Cluster has exceeded. | - |
404 | QuotaExceed.Zone | The maximum zone quota of Dedicated Host Cluster has exceeded. | - |
404 | InvalidParam.Zone | The specified zone not match region. | - |
404 | InvalidRegionId.NotFound | The 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 time | Summary of changes | Operation |
---|---|---|
2023-06-13 | The Error code has changed | View Change Details |