All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECS::DedicatedHost

Last Updated:Mar 25, 2024

ALIYUN::ECS::DedicatedHost is used to create a dedicated host.

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

Type

Required

Editable

Description

Constraint

DedicatedHostType

String

Yes

No

The type of the dedicated host.

None

DedicatedHostName

String

No

No

The name of the dedicated host.

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 but cannot start with http:// or https://.

PeriodUnit

String

No

No

The unit of the billing cycle.

Default value: Month. Valid values:

  • Week

  • Month

  • Year

AutoReleaseTime

String

No

No

The time that is scheduled for the dedicated host to be automatically released.

If you do not specify the AutoReleaseTime parameter, the dedicated host is automatically released.

The scheduled release time must be within the range of 30 minutes to three years from the current time.

If the value of ss is not 00, the start time is rounded to the nearest minute based on the value of mm.

Description

String

No

No

The description of the dedicated host.

None

AutoRenewPeriod

Number

No

No

The auto-renewal period of the dedicated host.

Valid values: 1, 2, 3, 6, and 12.

Unit: months.

Period

Number

No

No

The subscription period of the dedicated host.

  • Valid values when the PeriodUnit parameter is set to Week: 1, 2, and 3.

  • Valid values when the PeriodUnit parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.

  • Valid values when the PeriodUnit parameter is set to Year: 1, 2, 3, 4, and 5.

ZoneId

String

No

No

The ID of the zone where the dedicated host resides.

This parameter is empty by default. If this parameter is not specified, the system automatically selects a zone.

AutoRenew

String

No

No

Specifies whether to enable auto-renewal for the dedicated host.

Default value: False. Valid values:

  • True

  • False

ChargeType

String

No

No

The billing method of the dedicated host.

Valid values:

  • PrePaid: subscription.

    If you set this parameter to PrePaid, make sure that you have a valid payment method. Otherwise, an InvalidPayMethod error is returned.

  • PostPaid: pay-as-you-go.

AutoPlacement

String

No

No

Specifies whether to add the dedicated host to the resource pool for automatic deployment.

Default value: on. Valid values:

  • on: The dedicated host is added to the resource pool for automatic deployment

  • off: The dedicated host is not added to the resource pool for automatic deployment.

If you do not specify the DedicatedHostId parameter when you create an ECS instance on a dedicated host, Alibaba Cloud automatically selects a dedicated host from the resource pool to host the instance. For more information, see Functions and features.

Tags

List

No

No

The custom tags of the instance.

A maximum of 20 tags can be specified in the [{"Key": "tagKey", "Value": "tagValue"},{"Key": "tagKey2", "Value": "tagValue2"}] format.

For more information, see the Tags properties section in this topic.

ActionOnMaintenance

String

No

No

The policy that is used to migrate the instances from the dedicated host when the dedicated host fails or needs to be repaired online.

Valid values:

  • Migrate: The instances are migrated to another physical server and restarted.

  • Stop: The instances on the dedicated host are stopped. If the dedicated host cannot be repaired, the instances are migrated to another physical server and restarted.

If the dedicated host is attached with cloud disks, the default value is Migrate. If the dedicated host is attached with 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 ID of the resource group to which the dedicated host belongs.

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 that you want 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 tag key must be 1 to 128 characters in length and cannot contain http:// or https://. It cannot start with acs: or aliyun.

Value

String

No

No

The tag value.

The tag value must be 0 to 128 characters in length and cannot contain http:// or https://. It cannot start with acs: or aliyun.

Response parameters

Fn::GetAtt

  • OrderId: the order ID.

  • DedicatedHostIds: the list of dedicated host IDs.

Examples

YAML format

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

JSON format

{
  "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"
        ]
      }
    }
  }
}

For more examples, visit DedicatedHost.json and DedicatedHost.yml.