ALIYUN::ENS::Instance

Updated at:

Use the ALIYUN::ENS::Instance resource type to create an Edge Node Service (ENS) instance.

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 name

Type

Required

Update allowed

Description

Constraints

AutoRenewPeriod

Integer

No

No

The auto-renewal duration.

This parameter is required 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 custom data.

None

IpType

String

No

No

The IP address type.

Valid values:

  • ipv4 (default)

  • ipv6

  • ipv4Andipv6

SystemDiskSize

Integer

Yes

No

The size of the system disk.

Valid values: multiples of 10, with a minimum value of 20.

Unit: GiB.

Note

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

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 parameter is required if you specify PrivateIpAddress.

Period

Integer

Yes

No

The subscription duration of the resource.

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 billing method for the public bandwidth.

This parameter is required when you create an instance for the first time. If you already have instances, the system uses the existing billing method by default. Valid values:

  • BandwidthByDay: The daily peak bandwidth.

  • 95BandwidthByMonth: pay-by-monthly-95th-percentile-bandwidth.

ImageId

String

Yes

No

The ID of the image file. This is the image resource used to start the instance.

None

PaymentType

String

No

No

The billing method.

Valid value: Subscription.

DataDiskSize

Integer

Yes

No

The size of the data disk.

Valid values: 20 to 500.

Unit: GiB.

EnsRegionId

String

Yes

No

The ID of the ENS region.

None

InstanceType

String

Yes

No

The instance type.

For more information about instance types, see Limits.

HostName

String

No

No

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

The hostname cannot start or end with a period (.) or a hyphen (-). It cannot contain consecutive periods or hyphens. The naming conventions are as follows:

  • For a Windows instance: The hostname must be 2 to 15 characters in length. It can contain letters, digits, and hyphens (-). It cannot contain periods (.) or be composed of only digits.

  • For other instance types, such as Linux: The hostname must be 2 to 64 characters in length. It can contain periods (.). The part between two periods is a segment. 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 parameter, the instance ID is used as the default value.

UniqueSuffix

Boolean

No

No

Specifies whether to append a sequential suffix to the HostName and InstanceName.

The sequential suffix increments from 001 and cannot exceed 999.

Password

String

No

No

The instance password.

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

Return values

Fn::GetAtt

  • AutoRenewPeriod: The auto-renewal duration.

  • KeyPairName: The name of the key pair.

  • PrivateIpAddress: The private IP address.

  • UserData: The custom data.

  • IpType: The IP address type.

  • InstanceId: The instance ID.

  • 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 billing method for public bandwidth.

  • PublicIps: The public IP addresses.

  • PrivateIps: The private IP addresses.

  • ImageId: The image ID.

  • PaymentType: The billing method.

  • DataDiskSize: The size of the data disk.

  • EnsRegionId: The ID of the ENS region.

  • InstanceType: The instance type.

  • HostName: The hostname of the instance.

  • InstanceName: The name of the instance.

  • UniqueSuffix: Indicates whether a sequential suffix is appended to the HostName and InstanceName.

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