Creates dedicated hosts.
Syntax
{
"Type": "ALIYUN::ECS::DedicatedHost",
"Properties": {
"DedicatedHostType": String,
"DedicatedHostName": String,
"PeriodUnit": String,
"AutoReleaseTime": String,
"Description": String,
"AutoPlacement": String,
"Tags": List,
"AutoRenewPeriod": Number,
"ActionOnMaintenance": String,
"Period": Number,
"AutoRenew": String,
"NetworkAttributesSlbUdpTimeout": Integer,
"ChargeType": String,
"ResourceGroupId": String,
"DedicatedHostClusterId": String,
"MinQuantity": Integer,
"CpuOverCommitRatio": Number,
"ZoneId": String,
"NetworkAttributesUdpTimeout": Integer,
"Quantity": Integer
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
DedicatedHostType |
String |
Yes |
No |
The dedicated host type. |
None. |
|
DedicatedHostName |
String |
No |
No |
The dedicated host name. |
The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with |
|
PeriodUnit |
String |
No |
No |
The unit of the billing cycle. |
Valid values:
|
|
AutoReleaseTime |
String |
No |
No |
The automatic release time. |
If you do not specify AutoReleaseTime, the dedicated hosts are not automatically released. The time must be within 30 minutes to 3 years from the current time. If the value of |
|
Description |
String |
No |
No |
The dedicated host description. |
None. |
|
AutoRenewPeriod |
Number |
No |
No |
The auto-renewal period. |
Valid values: 1, 2, 3, 6, and 12. Unit: month. |
|
Period |
Number |
No |
No |
The subscription duration. |
|
|
DedicatedHostClusterId |
String |
No |
No |
The ID of the dedicated host cluster. |
None. |
|
MinQuantity |
Integer |
No |
No |
The minimum number of dedicated hosts to create. |
Valid values: 1 to 100. |
|
CpuOverCommitRatio |
Number |
No |
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 set the CPU overcommit ratio to 4, the number of available vCPUs on the dedicated host is 416. For scenarios with minimal CPU stability requirements or light CPU load, such as development and test environments, you can increase the CPU overcommit ratio to deploy more Elastic Compute Service (ECS) instances of the same specifications on the dedicated host and reduce the unit deployment cost. |
|
ZoneId |
String |
No |
No |
The zone ID of the dedicated hosts. |
This property is empty by default. If you leave this property empty, the system automatically selects a zone. |
|
AutoRenew |
String |
No |
No |
Specifies whether to enable auto-renewal for the dedicated hosts. |
Valid values:
|
|
ChargeType |
String |
No |
No |
The billing method of the dedicated hosts. |
Valid values:
|
|
AutoPlacement |
String |
No |
No |
Specifies whether to add the dedicated host to the resource pool for automatic deployment. |
Valid values:
If you do not specify DedicatedHostId when you create an instance on a dedicated host and set AutoPlacement to on, the system automatically selects a dedicated host from the resource pool for the instance. For more information, see Functions and features. |
|
Tags |
List |
No |
No |
The custom tags. |
You can add up to 20 tags in the For more information, see Tags properties. |
|
ActionOnMaintenance |
String |
No |
No |
The policy used to migrate instances on the dedicated host when the dedicated host fails or needs to be repaired online. |
Valid values:
If the dedicated host uses cloud disks, the default value is Migrate. If the dedicated host uses local disks, the default value is Stop. |
|
NetworkAttributesSlbUdpTimeout |
Integer |
No |
No |
The timeout period for a UDP session between Server Load Balancer (SLB) and the dedicated host. |
Valid values: 15 to 310. Unit: seconds. |
|
ResourceGroupId |
String |
No |
Yes |
The resource group ID of the dedicated hosts. |
None. |
|
NetworkAttributesUdpTimeout |
Integer |
No |
No |
The timeout period for a UDP session between a user and an Alibaba Cloud service on the dedicated host. |
Valid values: 15 to 310. Unit: seconds. |
|
Quantity |
Integer |
No |
No |
The number of dedicated hosts to create. |
Valid values: 1 to 100. Default value: 1. |
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Key |
String |
Yes |
No |
The tag key. |
The key must be 1 to 128 characters in length and cannot contain |
|
Value |
String |
No |
No |
The tag value. |
The value can be up to 128 characters in length and cannot contain |
Return values
Fn::GetAtt
-
OrderId: the order ID.
-
DedicatedHostIds: the dedicated host IDs.
-
Arn: the Alibaba Cloud Resource Name (ARN).
Examples
ROSTemplateFormatVersion: '2015-09-01'
Description: Test ECS DedicatedHost
Parameters:
DedicatedHostType:
Type: String
Default: ddh.g6
DedicatedHostName:
Type: String
Default: mytest
Resources:
DedicatedHost:
Type: ALIYUN::ECS::DedicatedHost
Properties:
DedicatedHostType:
Ref: DedicatedHostType
DedicatedHostName:
Ref: DedicatedHostName
ChargeType: PostPaid
Outputs:
OrderId:
Value:
Fn::GetAtt:
- DedicatedHost
- OrderId
DedicatedHostIds:
Value:
Fn::GetAtt:
- DedicatedHost
- DedicatedHostIds{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Test ECS DedicatedHost",
"Parameters": {
"DedicatedHostType": {
"Type": "String",
"Default": "ddh.g6"
},
"DedicatedHostName": {
"Type": "String",
"Default": "mytest"
}
},
"Resources": {
"DedicatedHost": {
"Type": "ALIYUN::ECS::DedicatedHost",
"Properties": {
"DedicatedHostType": {
"Ref": "DedicatedHostType"
},
"DedicatedHostName": {
"Ref": "DedicatedHostName"
},
"ChargeType": "PostPaid"
}
}
},
"Outputs": {
"OrderId": {
"Value": {
"Fn::GetAtt": [
"DedicatedHost",
"OrderId"
]
}
},
"DedicatedHostIds": {
"Value": {
"Fn::GetAtt": [
"DedicatedHost",
"DedicatedHostIds"
]
}
}
}
}