ALIYUN:: ECS:: DedicatedHost is used to create a DDH.

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,
    "ZoneId": String,
    "NetworkAttributesUdpTimeout": Integer,
    "Quantity": Integer
  }
}

Properties

Property Name Type Required Update allowed Description Constraints
DedicatedHostType String Yes No The specification of the DDH. None.
DedicatedHostName String No No The name of the DDH. It can be 2 to 128 characters in length. It must start with an uppercase/lowercase letter or a chinese character, and cannot start with http:// orhttps:// start with. It can contain numbers, half-width colons, underscores (_), and hyphens (-).
PeriodUnit String No No The unit of renewal.

Valid values:

  • Week: Week. Valid values of the Period parameter: {1,2, 3}.
  • Month (default): Month. Valid values of the Period parameter: {1,2, 3,6, 12}.
AutoReleaseTime String No No

Automatic release time. If you do not set the AutoReleaseTime parameter, auto-release is disabled. The DDH will not be released at the scheduled time.

  • It cannot be earlier than 30 minutes after the current time.
  • It cannot be more than three years later than the current time.
  • If the second (SS) the value is not00, It is automatically set to the current minute (MM) start time.
None.
Description String No No The description of the DDH. None.
AutoRenewPeriod Number No No The automatic renewal cycle. Unit: month. Valid values: 1,2, 3,6, and 12.
Period Number No No The subscription duration. Unit: month. Valid values: 1-9,12, 24,36, and 48,60.
ZoneId String No No

The zone of the DDH.

Default value: null, indicating that the system selects a zone.

None.
AutoRenew String No No

Indicates whether to automatically renew a subscription-based DDH.

Valid values:
  • True
  • False

Default value: False.

ChargeType String No No The billing method of the DDH. Valid values:

PrePaid: subscription.

PostPaid: pay-as-you-go.

If you select subscription, make sure that you have a valid balance or credit amount. Otherwise, the system prompts youInvalidPayMethod.

AutoPlacement String No No Indicates whether the DDH is added to the automatic deployment resource pool. When you create an instance on a DDH without specifying the DedicatedHostId parameter, Alibaba Cloud automatically selects a DDH from the resource pool to deploy the instance. For more information, seeFeatures. Valid values: on and off.
Note

If you do not set this parameter, the DDH is added to the automatic deployment resource pool by default.

If you do not want ddhs to be added to the automatic deployment resource pool, set this parameter to off.

Tags List No No Custom tags. A maximum of 20 tags are supported. Format:[{"Key": "tagKey", "Value": "tagValue"},{"Key": "tagKey2", "Value": "tagValue2"}].
ActionOnMaintenance String No No When a DDH fails or is repaired online, you can configure a migration solution for the DDH. Valid values:
  • Migrate: migrates instances to other physical machines and restarts the instances.
  • Stop: stops instances on the current DDH, confirms that the DDH cannot be repaired, migrates the instances to another physical server, and restarts the instances.
The default value is Migrate when cloud disks are attached to the DDH. The default value is Stop when local disks are attached to the DDH.
NetworkAttributesSlbUdpTimeout Integer No No The timeout period of the UDP session that is established to the SLB instance. Valid values: 15 to 310. Unit: seconds.
ResourceGroupId String No No The ID of the resource group to which the DDH belongs. None.
NetworkAttributesUdpTimeout Integer No No Set the timeout period for UDP sessions for cloud services running on the DDH. Valid values: 15 to 310. Unit: seconds.
Quantity Integer No No The number of ddhs created this time. Valid values: 1 to 100. Default value: 1.

Return value

Fn::GetAtt

  • OrderId: the ID of the order.
  • DedicatedHostIds: the list of host IDs.

Example

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "AutoRenewPeriod": {
      "Type": "Number",
      "Description": "The time period of auto renew. When the parameter InstanceChargeType is PrePaid, it will take effect.It could be 1, 2, 3, 6, 12\. Default value is 1.",
      "AllowedValues": [
        1,
        2,
        3,
        6.
        12
      ],
      "Default": 1
    },
    "Description": {
      "Type": "String",
      "Description": "The description of host."
    },
    "ZoneId": {
      "Type": "String",
      "Description": "The zone to create the host."
    },
    "DedicatedHostName": {
      "Type": "String",
      "Description": "The name of the dedicated host, [2, 128] English or Chinese characters. It must begin with an uppercase/lowercase letter or a Chinese character, and may contain numbers, '_' or '-'. It cannot begin with http:// or https://."
    },
    "ChargeType": {
      "Type": "String",
      "Description": "Instance Charge type, allowed value: Prepaid and Postpaid. If specified Prepaid, please ensure you have sufficient balance in your account. Or instance creation will be failure. Default value is Postpaid.",
      "AllowedValues": [
        "PrePaid",
        "PostPaid"
      ],
      "Default": "PostPaid"
    },
    "AutoRenew": {
      "Type": "String",
      "Description": "Whether renew the fee automatically? When the parameter InstanceChargeType is PrePaid, it will take effect. Range of value:True: automatic renewal.False: no automatic renewal. Default value is False.",
      "AllowedValues": [
        "True",
        "False"
      ],
      "Default": "False"
    },
    "Period": {
      "Type": "Number",
      "Description": "Prepaid time period. Unit is month, it could be from 1 to 9 or 12, 24, 36, 48, 60\. Default value is 1.",
      "AllowedValues": [
        1,
        2,
        3,
        4.
        5,
        6.
        7.
        8,
        9,
        12,
        24,
        36,
        48,
        60
      ],
      "Default": 1
    },
    "DedicatedHostType": {
      "Type": "String",
      "Description": "The instance type of host."
    },
    "PeriodUnit": {
      "Type": "String",
      "Description": "Unit of prepaid time period, it could be Week/Month. Default value is Month.",
      "AllowedValues": [
        "Week",
        "Month"
      ],
      "Default": "Month"
    },
    "AutoReleaseTime": {
      "Type": "String",
      "Description": "Auto release time for created host, Follow ISO8601 standard using UTC time. format is 'yyyy-MM-ddTHH:mm:ssZ'. Not bigger than 3 years from this day onwards"
    }
  },
  "Resources": {
    "Host": {
      "Type": "ALIYUN::ECS::DedicatedHost",
      "Properties": {
        "AutoRenewPeriod": {
          "Ref": "AutoRenewPeriod"
        },
        "Description": {
          "Ref": "Description"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "DedicatedHostName": {
          "Ref": "DedicatedHostName"
        },
        "ChargeType": {
          "Ref": "ChargeType"
        },
        "AutoRenew": {
          "Ref": "AutoRenew"
        },
        "Period": {
          "Ref": "Period"
        },
        "DedicatedHostType": {
          "Ref": "DedicatedHostType"
        },
        "PeriodUnit": {
          "Ref": "PeriodUnit"
        },
        "AutoReleaseTime": {
          "Ref": "AutoReleaseTime"
        }
      }
    }
  },
  "Outputs": {
    "OrderId": {
      "Description": "The order id list of created instance.",
      "Value": {
        "Fn::GetAtt": [
          "Host",
          "OrderId"
        ]
      }
    },
    "DedicatedHostIds": {
      "Description": "The host id list of created hosts",
      "Value": {
        "Fn::GetAtt": [
          "Host",
          "DedicatedHostIds"
        ]
      }
    }
  }
}