ALIYUN::ENS::Instance is used to create an 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,
    "Password": String
  }
}

Properties

Property Type Required Editable Description Constraint
AutoRenewPeriod String No No The automatic renewal period for created instances. This parameter is required when the AutoRenew parameter is set to True.

Valid values: 1 to 12.

Unit: Months.

KeyPairName String No No The name of the SSH key pair. None
PrivateIpAddress String No No The internal network address. None
UserData String No No 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. Value: a multiple of 10. The minimum value is 20.

Unit: GiB.

Note The system disk size is greater than the image size.
AutoRenew String No No Specifies whether to enable auto renewal for worker nodes. Valid values:
  • True
  • False(default)
VSwitchId String No No The ID of the VSwitch. If PrivateIpAddress is specified, this parameter must be specified.
Period Integer Yes No The unit of the billing cycle. Valid values:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 12

Unit: Months.

Quantity Integer Yes No The number of instances. None
InternetChargeType String No No The billing method for Internet access. This parameter must be specified if you are creating an instance resource for the first time. If instances already exist, the first instance is billed based on the existing billing method. Valid values:
  • BandwidthByDay: Pay by the daily peak bandwidth.
  • 95BandwidthByMonth: Pay by the monthly 95th percentile bandwidth.
ImageId String Yes No The ID of the image file used to create the instance. None
PaymentType String No No The billing method. 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 specifications of the instance. None
Password String No No The new password of the instance. The password must be 8 to 30 characters in length And must contain at least three of the following character types: letters, digits, and special character. The following special characters are supported:
( ) ` ~ ! @ # $ % ^ & * - _ + = | { } [ ] : ; ' < > , . ? /.

Response parameters

Fn::GetAtt

  • Status: the Status.
  • AutoRenewPeriod: the duration of each auto-renewal.
  • KeyPairName: the name of the key pair.
  • PrivateIpAddress: The intranet IP address.
  • UserData: The custom data.
  • IpType:IP address type.
  • InstanceId: the ID of the instance.
  • SystemDiskSize: the size of the system disk.
  • AutoRenew: whether to auto-renewal.
  • VSwitchId: the ID of the vSwitch
  • Period: The purchase Period.
  • Quantity: the number of instances.
  • InternetChargeType: public network billing method.
  • PublicIps: the public IP address of the instance.
  • PrivateIps: The private IP address of the instance.
  • ImageId: Image ID.
  • PaymentType: the billing method.
  • DataDiskSize: the size of the data disk.
  • EnsRegionId: The region ID of the ENS.
  • InstanceType: The specifications of the instance.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "AutoRenewPeriod": {
      "Type": "Number",
      "Description": "The time period of auto renew. it will take effect.It could be 1, 2, 3, 6, 12. Default value is 1."
    },
    "KeyPairName": {
      "Type": "String",
      "Description": "SSH key pair name."
    },
    "PrivateIpAddress": {
      "Type": "String",
      "Description": ""
    },
    "UserData": {
      "Type": "String",
      "Description": "User data to pass to instance. [1, 16KB] characters.User data should not be base64 encoded. If you want to pass base64 encoded string to the property, use function Fn::Base64Decode to decode the base64 string first."
    },
    "IpType": {
      "Type": "String",
      "Description": "ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4."
    },
    "SystemDiskSize": {
      "Type": "Number",
      "Description": "Disk size of the system disk."
    },
    "AutoRenew": {
      "Type": "String",
      "Description": "Whether renew the fee automatically? it could be True,FalseDefault value is False."
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "The vSwitch Id to create ens instance."
    },
    "Period": {
      "Type": "Number",
      "Description": "Prepaid time period. Unit is month, it could be from 1 to 9 or 12. Default value is 1."
    },
    "Quantity": {
      "Type": "Number",
      "Description": "number of instances to create."
    },
    "InternetChargeType": {
      "Type": "String",
      "Description": "Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth."
    },
    "ImageId": {
      "Type": "String",
      "Description": "Image ID to create ens instance."
    },
    "PaymentType": {
      "Type": "String",
      "Description": "Payment Type.only support value Subscription."
    },
    "DataDiskSize": {
      "Type": "Number",
      "Description": "Disk size of the system disk, range from 20 to 500 GB. If you specify with your own image, make sure the system disk size bigger than image size."
    },
    "EnsRegionId": {
      "Type": "String",
      "Description": "ENS Region Id."
    },
    "InstanceType": {
      "Type": "String",
      "Description": "ENS instance supported instance type, make sure it should be correct."
    },
    "Password": {
      "Type": "String",
      "Description": "Password of created ens instance. Must contain at least 3 types of special character, lower character, upper character, number."
    }
  },
  "Resources": {
    "ENSInstance": {
      "Type": "ALIYUN::ENS::Instance",
      "Properties": {
        "AutoRenewPeriod": {
          "Ref": "AutoRenewPeriod"
        },
        "KeyPairName": {
          "Ref": "KeyPairName"
        },
        "PrivateIpAddress": {
          "Ref": "PrivateIpAddress"
        },
        "UserData": {
          "Ref": "UserData"
        },
        "IpType": {
          "Ref": "IpType"
        },
        "SystemDiskSize": {
          "Ref": "SystemDiskSize"
        },
        "AutoRenew": {
          "Ref": "AutoRenew"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "Period": {
          "Ref": "Period"
        },
        "Quantity": {
          "Ref": "Quantity"
        },
        "InternetChargeType": {
          "Ref": "InternetChargeType"
        },
        "ImageId": {
          "Ref": "ImageId"
        },
        "PaymentType": {
          "Ref": "PaymentType"
        },
        "DataDiskSize": {
          "Ref": "DataDiskSize"
        },
        "EnsRegionId": {
          "Ref": "EnsRegionId"
        },
        "InstanceType": {
          "Ref": "InstanceType"
        },
        "Password": {
          "Ref": "Password"
        }
      }
    }
  },
  "Outputs": {
    "Status": {
      "Description": "Instance status,It could be Running,Stopped, Starting.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "Status"
        ]
      }
    },
    "AutoRenewPeriod": {
      "Description": "The time period of auto renew. it will take effect.It could be 1, 2, 3, 6, 12. Default value is 1.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "AutoRenewPeriod"
        ]
      }
    },
    "KeyPairName": {
      "Description": "SSH key pair name.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "KeyPairName"
        ]
      }
    },
    "PrivateIpAddress": {
      "Description": "Private IP for the instance created.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "PrivateIpAddress"
        ]
      }
    },
    "UserData": {
      "Description": "User data to pass to instance. [1, 16KB] characters.User data should not be base64 encoded. If you want to pass base64 encoded string to the property, use function Fn::Base64 Decode to decode the base64 string first.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "UserData"
        ]
      }
    },
    "IpType": {
      "Description": "ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "IpType"
        ]
      }
    },
    "InstanceId": {
      "Description": "InstanceId.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "InstanceId"
        ]
      }
    },
    "SystemDiskSize": {
      "Description": "Disk size of the system disk.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "SystemDiskSize"
        ]
      }
    },
    "AutoRenew": {
      "Description": "Whether renew the fee automatically? it could be True,FalseDefault value is False.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "AutoRenew"
        ]
      }
    },
    "VSwitchId": {
      "Description": "The vSwitch Id to create ens instance.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "VSwitchId"
        ]
      }
    },
    "Period": {
      "Description": "Prepaid time period. Unit is month, it could be from 1 to 9 or 12. Default value is 1.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "Period"
        ]
      }
    },
    "Quantity": {
      "Description": "number of instances to create.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "Quantity"
        ]
      }
    },
    "InternetChargeType": {
      "Description": "Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "InternetChargeType"
        ]
      }
    },
    "PublicIps": {
      "Description": "Public IP",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "PublicIps"
        ]
      }
    },
    "PrivateIps": {
      "Description": "Private IP",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "PrivateIps"
        ]
      }
    },
    "ImageId": {
      "Description": "Image ID to create ens instance.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "ImageId"
        ]
      }
    },
    "PaymentType": {
      "Description": "Payment Type.only support value Subscription.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "PaymentType"
        ]
      }
    },
    "DataDiskSize": {
      "Description": "Disk size of the system disk, range from 20 to 500 GB. If you specify with your own image, make sure the system disk size bigger than image size.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "DataDiskSize"
        ]
      }
    },
    "EnsRegionId": {
      "Description": "ENS Region Id.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "EnsRegionId"
        ]
      }
    },
    "InstanceType": {
      "Description": "ENS instance supported instance type, make sure it should be correct.",
      "Value": {
        "Fn::GetAtt": [
          "ENSInstance",
          "InstanceType"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  AutoRenewPeriod:
    Type: Number
    Description: >-
      The time period of auto renew. it will take effect.It could be 1, 2, 3, 6,
      12. Default value is 1.
  KeyPairName:
    Type: String
    Description: SSH key pair name.
  PrivateIpAddress:
    Type: String
    Description: ''
  UserData:
    Type: String
    Description: >-
      User data to pass to instance. [1, 16KB] characters.User data should not
      be base64 encoded. If you want to pass base64 encoded string to the
      property, use function Fn::Base64Decode to decode the base64 string first.
  IpType:
    Type: String
    Description: 'ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.'
  SystemDiskSize:
    Type: Number
    Description: Disk size of the system disk.
  AutoRenew:
    Type: String
    Description: >-
      Whether renew the fee automatically? it could be True and FalseDefault value is
      False.
  VSwitchId:
    Type: String
    Description: The vSwitch Id to create ens instance.
  Period:
    Type: Number
    Description: >-
      Prepaid time period. Unit is month, it could be from 1 to 9 or 12. Default
      value is 1.
  Quantity:
    Type: Number
    Description: number of instances to create.
  InternetChargeType:
    Type: String
    Description: >-
      Instance Charge type.it could be 95BandwidthByMonth,
      PayByBandwidth4thMonth.
  ImageId:
    Type: String
    Description: Image ID to create ens instance.
  PaymentType:
    Type: String
    Description: Payment Type.only support value Subscription.
  DataDiskSize:
    Type: Number
    Description: >-
      Disk size of the system disk, range from 20 to 500 GB. If you specify with
      your own image, make sure the system disk size bigger than image size.
  EnsRegionId:
    Type: String
    Description: ENS Region Id.
  InstanceType:
    Type: String
    Description: 'ENS instance supported instance type, make sure it should be correct.'
  Password:
    Type: String
    Description: >-
      Password of created ens instance. Must contain at least 3 types of special
      character, lower character, upper character, number.
Resources:
  ENSInstance:
    Type: 'ALIYUN::ENS::Instance'
    Properties:
      AutoRenewPeriod:
        Ref: AutoRenewPeriod
      KeyPairName:
        Ref: KeyPairName
      PrivateIpAddress:
        Ref: PrivateIpAddress
      UserData:
        Ref: UserData
      IpType:
        Ref: IpType
      SystemDiskSize:
        Ref: SystemDiskSize
      AutoRenew:
        Ref: AutoRenew
      VSwitchId:
        Ref: VSwitchId
      Period:
        Ref: Period
      Quantity:
        Ref: Quantity
      InternetChargeType:
        Ref: InternetChargeType
      ImageId:
        Ref: ImageId
      PaymentType:
        Ref: PaymentType
      DataDiskSize:
        Ref: DataDiskSize
      EnsRegionId:
        Ref: EnsRegionId
      InstanceType:
        Ref: InstanceType
      Password:
        Ref: Password
Outputs:
  Status:
    Description: 'Instance status,It could be Running,Stopped, Starting.'
    Value:
      'Fn::GetAtt':
        -ENSInstance
        - Status
  AutoRenewPeriod:
    Description: >-
      The time period of auto renew. it will take effect.It could be 1, 2, 3, 6,
      12. Default value is 1.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -AutoRenewPeriod
  KeyPairName:
    Description: SSH key pair name.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -KeyPairName
  PrivateIpAddress:
    Description: Private IP for the instance created.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -PrivateIpAddress
  UserData:
    Description: >-
      User data to pass to instance. [1, 16KB] characters.User data should not
      be base64 encoded. If you want to pass base64 encoded string to the
      property, use function Fn::Base64Decode to decode the base64 string first.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -UserData
  IpType:
    Description: 'ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.'
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -IpType
  InstanceId:
    Description: InstanceId.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        - InstanceId
  SystemDiskSize:
    Description: Disk size of the system disk.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        - SystemDiskSize
  AutoRenew:
    Description: >-
      Whether renew the fee automatically? it could be True and FalseDefault value is
      False.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -AutoRenew
  VSwitchId:
    Description: The vSwitch Id to create ens instance.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        - VSwitchId
  Period:
    Description: >-
      Prepaid time period. Unit is month, it could be from 1 to 9 or 12. Default
      value is 1.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -Period
  Quantity:
    Description: number of instances to create.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -Quantity
  InternetChargeType:
    Description: >-
      Instance Charge type.it could be 95BandwidthByMonth,
      PayByBandwidth4thMonth.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -InternetChargeType
  PublicIps:
    Description: Public IP
    Value:
      'Fn::GetAtt':
        -ENSInstance
        - PublicIps
  PrivateIps:
    Description: Private IP
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -PrivateIps
  ImageId:
    Description: Image ID to create ens instance.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        - ImageId
  PaymentType:
    Description: Payment Type.only support value Subscription.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -PaymentType
  DataDiskSize:
    Description: >-
      Disk size of the system disk, range from 20 to 500 GB. If you specify with
      your own image, make sure the system disk size bigger than image size.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -DataDiskSize
  EnsRegionId:
    Description: ENS Region Id.
    Value:
      'Fn::GetAtt':
        -ENSInstance
        -EnsRegionId
  InstanceType:
    Description: 'ENS instance supported instance type, make sure it should be correct.'
    Value:
      'Fn::GetAtt':
        -ENSInstance
        - InstanceType