All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ENS::Instance

Last Updated:Apr 17, 2025

ALIYUN::ENS::Instance is used to create Edge Node Service (ENS) instances.

Syntax

{
  "Type": "ALIYUN::ENS::Instance",
  "Properties": {
    "AutoRenewPeriod": Integer,
    "KeyPairName": String,
    "PrivateIpAddress": String,
    "UserData": String,
    "IpType": String,
    "SystemDiskSize": Integer,
    "AutoRenew": String,
    "VSwitchId": String,
    "Period": Integer,
    "Quantity": Integer,
    "InternetChargeType": String,
    "ImageId": String,
    "PaymentType": String,
    "DataDiskSize": Integer,
    "EnsRegionId": String,
    "InstanceType": String,
    "HostName": String,
    "InstanceName": String,
    "UniqueSuffix": Boolean,
    "Password": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

AutoRenewPeriod

Integer

No

No

The auto-renewal period.

This property must be specified when AutoRenew is set to True.

Valid values: 1 to 12.

Unit: month.

KeyPairName

String

No

No

The name of the key pair.

None.

PrivateIpAddress

String

No

No

The private IP address.

None.

UserData

String

No

No

The user data.

None.

IpType

String

No

No

The type of the IP address.

Valid values:

  • ipv4 (default)

  • ipv6

  • ipv4Andipv6

SystemDiskSize

Integer

Yes

No

The size of the system disk.

Valid values: a multiple of 10. Minimum value: 20.

Unit: GiB.

Note

The size of the system disk must be larger than the size of the image.

AutoRenew

String

No

No

Specifies whether to enable auto-renewal.

Valid values:

  • True

  • False (default)

VSwitchId

String

No

No

The ID of the vSwitch.

This property must be specified when PrivateIpAddress is specified.

Period

Integer

Yes

No

The subscription duration.

Valid values:

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 12

Unit: month.

Quantity

Integer

Yes

No

The number of instances.

None.

InternetChargeType

String

No

No

The metering method for Internet usage.

This property must be specified when you are creating instances for the first time. The existing metering method is used by default if you have created an instance. Valid values:

  • BandwidthByDay: daily peak bandwidth.

  • 95BandwidthByMonth: monthly 95th percentile bandwidth.

ImageId

String

Yes

No

The ID of the image that you want to use to create the instance.

None.

PaymentType

String

No

No

The billing method.

Set the value to Subscription.

DataDiskSize

Integer

Yes

No

The size of the data disk.

Valid values: 20 to 500.

Unit: GiB.

EnsRegionId

String

Yes

No

The region ID of the ENS instances.

None.

InstanceType

String

Yes

No

The instance type.

None.

HostName

String

No

No

The hostname of the Elastic Compute Service (ECS) instance.

The hostname cannot start or end with a period (.) or hyphen (-) and cannot contain consecutive periods (.) or hyphens (-). Naming rules for instance hostnames:

  • For an instance that runs Windows, the hostname must be 2 to 15 characters in length. It can contain letters, digits, and hyphens (-) and cannot contain periods (.) or only digits.

  • For an instance that runs a different operating system such as Linux, the hostname must be 2 to 64 characters in length. You can use periods (.) to separate the hostname into multiple segments. Each segment can contain letters, digits, and hyphens (-).

InstanceName

String

No

No

The name of the instance.

The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

If you do not specify this property, the value of InstanceId is used as the instance name by default.

UniqueSuffix

Boolean

No

No

Specifies whether to append sequential suffixes to the HostName and InstanceName values.

The sequential suffixes range from 001 to 999.

Password

String

No

No

The password of the instance.

The password must be 8 to 30 characters in length. It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The following special characters are supported: ( ) ` ~ ! @ # $ % ^ & * - _ + = | { } [ ] : ; ' < > , . ? /.

Return values

Fn::GetAtt

  • AutoRenewPeriod: the auto-renewal period.

  • KeyPairName: the name of the key pair.

  • PrivateIpAddress: the private IP address.

  • UserData: the user data.

  • IpType: the type of the IP address.

  • InstanceId: the ID of the instance.

  • SystemDiskSize: the size of the system disk.

  • AutoRenew: indicates whether auto-renewal is enabled.

  • VSwitchId: the ID of the vSwitch.

  • Period: the subscription duration.

  • Quantity: the number of instances.

  • InternetChargeType: the metering method for Internet usage.

  • PublicIps: the public IP addresses.

  • PrivateIps: the private IP addresses.

  • ImageId: the ID of the image.

  • PaymentType: the billing method.

  • DataDiskSize: the size of the data disk.

  • EnsRegionId: the region ID of the ENS instances.

  • InstanceType: the instance type.

  • HostName: the hostname of the ECS instance.

  • InstanceName: the name of the instance.

  • UniqueSuffix: indicates whether sequential suffixes are appended to the HostName and InstanceName values.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  ENSInstance:
    Type: ALIYUN::ENS::Instance
    Properties:
      EnsRegionId: cn-chengdu-telecom-3
      ImageId: centos_6_08_64_20G_alibase_20171208
      InstanceType: ens.sn1.tiny
      InternetChargeType: 95BandwidthByMonth
      Password: Enstest123
      Period: 1
      Quantity: 2
      SystemDiskSize: 20
      DataDiskSize: 20
      PaymentType: Subscription
Outputs: {}
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "ENSInstance": {
      "Type": "ALIYUN::ENS::Instance",
      "Properties": {
        "EnsRegionId": "cn-chengdu-telecom-3",
        "ImageId": "centos_6_08_64_20G_alibase_20171208",
        "InstanceType": "ens.sn1.tiny",
        "InternetChargeType": "95BandwidthByMonth",
        "Password": "Enstest123",
        "Period": 1,
        "Quantity": 2,
        "SystemDiskSize": 20,
        "DataDiskSize": 20,
        "PaymentType": "Subscription"
      }
    }
  },
  "Outputs": {
  }
}