ALIYUN::ECS::LaunchTemplateVersion

更新时间:
复制为 MD 格式

ALIYUN::ECS::LaunchTemplateVersion类型用于创建实例启动模板。

语法

{
  "Type": "ALIYUN::ECS::LaunchTemplateVersion",
  "Properties": {
    "LaunchTemplateName": String,
    "LaunchTemplateData": Map,
    "LaunchTemplateId": String,
    "ResourceGroupId": String,
    "VersionDescription": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

LaunchTemplateData

Map

启动模板配置。

更多信息,请参考LaunchTemplateData属性

LaunchTemplateId

String

启动模板ID.。

必须指定LaunchTemplateIdLaunchTemplateName来指定启动模板。

LaunchTemplateName

String

启动模板名称。

名称长度必须为2128个字符. 名称必须以字母开头,且不能以http://或https://开头. 名称可以包含字母、数字、冒号(:)、下划线(_)和连字符(-)。

ResourceGroupId

String

实例所属的资源组ID。

VersionDescription

String

启动模板版本描述.。

描述长度必须为2256个字符,且不能以http://或https://开头。

LaunchTemplateData语法

"LaunchTemplateData": {
  "ImageOwnerAlias": String,
  "PrivateIpAddress": String,
  "Description": String,
  "DataDisks": List,
  "SystemDiskSize": Integer,
  "UserData": String,
  "SystemDiskDescription": String,
  "InstanceChargeType": String,
  "SystemDiskProvisionedIops": Integer,
  "SpotDuration": Integer,
  "SystemDiskEncrypted": String,
  "SystemDiskAutoSnapshotPolicyId": String,
  "RamRoleName": String,
  "SystemDiskPerformanceLevel": String,
  "Ipv6AddressCount": Integer,
  "NetworkType": String,
  "NetworkInterfaces": List,
  "ImageId": String,
  "SpotPriceLimit": Number,
  "SystemDiskDiskName": String,
  "InstanceType": String,
  "Tags": List,
  "HostName": String,
  "SpotStrategy": String,
  "PasswordInherit": Boolean,
  "KeyPairName": String,
  "IoOptimized": String,
  "ZoneId": String,
  "VSwitchId": String,
  "SecurityGroupId": String,
  "Period": Integer,
  "DeletionProtection": Boolean,
  "SecurityGroupIds": List,
  "InternetChargeType": String,
  "SystemDiskCategory": String,
  "DeploymentSetId": String,
  "SystemDiskBurstingEnabled": Boolean,
  "InstanceName": String,
  "SystemDiskDeleteWithInstance": Boolean,
  "EnableVmOsConfig": Boolean,
  "InternetMaxBandwidthOut": Integer,
  "VpcId": String,
  "InternetMaxBandwidthIn": Integer,
  "SystemDiskIops": Integer,
  "SecurityEnhancementStrategy": String,
  "AutoReleaseTime": String
}

LaunchTemplateData属性

属性名称

类型

必须

允许更新

描述

约束

AutoReleaseTime

String

实例自动释放时间。

按照ISO 8601标准,使用yyyy-MM-ddTHH:mm:ssZ格式指定时间。时间必须为UTC时间。

* 如果ss的值不是00,则时间会根据mm的值自动向下取整到最近的分钟。

* 指定时间必须至少比当前时间晚30分钟。

* 指定时间最多比当前时间晚三年。

DataDisks

List

数据盘集合.

最大支持16组磁盘。更多信息,请参考DataDisks属性

DeletionProtection

Boolean

是否为实例启用释放保护。

DeploymentSetId

String

部署实例的部署集ID。

Description

String

实例描述.。

描述长度必须为2256个字符,且不能以http://或https://开头。

EnableVmOsConfig

Boolean

是否启用实例的操作系统配置。

HostName

String

实例主机名。

主机名不能以句点(.)或连字符(-)开头或结尾,也不能包含连续的句点(.)或连字符(-)。

  • 对于Windows实例,主机名长度必须为215个字符,不能包含句点(.)或仅包含数字。可以包含字母、数字和连字符(-)。

  • 对于运行Linux等其他操作系统的实例,主机名长度必须为264个字符。可以使用句点(.)将主机名分隔为多个段,每段可以包含字母、数字和连字符(-)。

ImageId

String

用于创建ECS实例的镜像ID.

ImageOwnerAlias

String

镜像来源.

InstanceChargeType

String

实例计费方式.

取值范围:

  • PrePaid: 包年包月. 如果设置为PrePaid,请确保您的账户余额充足,否则会返回InvalidPayMethod错误。

  • PostPaid: 按量付费.

InstanceName

String

实例名称。

InstanceType

String

实例类型.

InternetChargeType

String

公网带宽计费方式。

取值范围:

  • PayByBandwidth: 按带宽计费.

  • PayByTraffic: 按流量计费.

InternetMaxBandwidthIn

Integer

公网最大入方向带宽。

单位: Mbit/s. 取值范围:

  • 当购买的公网出方向带宽小于等于10 Mbit/s时,此参数取值范围为110,默认值为10。

  • 当购买的公网出方向带宽大于10 Mbit/s时,此参数取值范围为1InternetMaxBandwidthOut的值,默认值为InternetMaxBandwidthOut的值。

InternetMaxBandwidthOut

Integer

公网最大出方向带宽.

单位: Mbit/s. 取值范围: 0 ~100.

IoOptimized

String

是否创建I/O优化实例.

Ipv6AddressCount

Integer

为主弹性网卡随机生成的IPv6地址数量。

取值范围: 1 ~10。

KeyPairName

String

绑定到实例的密钥对名称。

  • 对于Windows实例,此参数被忽略。即使指定了KeyPairName参数,Password参数仍然有效。

  • 对于Linux实例,默认禁用基于密码的登录方式。

NetworkInterfaces

List

弹性网卡信息.

更多信息,请参考NetworkInterfaces属性

NetworkType

String

实例网络类型.

取值范围:

  • classic: 经典网络

  • vpc: 专有网络.

PasswordInherit

Boolean

是否使用镜像中预配置的密码.。

Period

Integer

实例订阅周期。

单位: 月。 此参数仅在InstanceChargeType设置为PrePaid时有效且必填。 取值范围: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.

PrivateIpAddress

String

分配给实例的私网IP地址。

RamRoleName

String

实例RAM角色名称。

SecurityEnhancementStrategy

String

是否为操作系统启用安全加固。

取值范围:

  • Active: 启用安全加固。此值仅适用于公共镜像。

  • Deactive: 禁用安全加固。此值适用于所有类型的镜像。

SecurityGroupId

String

实例所属的安全组ID。

SecurityGroupIds

List

实例加入的一个或多个安全组。

最多支持配置16个安全组。

SpotDuration

Integer

抢占式实例的保留时长。

小时, 取值范围:0~6

- 保留时长为2~6,处于邀测状态。如需开通请提交工单。

- 如果值为0,则为无保护期模式。

SpotPriceLimit

Number

设置实例每小时最高价格.

SpotStrategy

String

按量付费实例的抢占策略。

此参数仅在InstanceChargeType设置为PostPaid时有效。 默认值: NoSpot. 取值范围:

  • NoSpot

  • SpotWithPriceLimit

  • SpotAsPriceGo

SystemDiskAutoSnapshotPolicyId

String

应用于系统盘的自动快照策略ID。

SystemDiskBurstingEnabled

Boolean

是否启用性能突发功能。

SystemDiskCategory

String

系统盘类型。

取值范围:

  • cloud: 普通云盘.

  • cloud_efficiency: 高效云盘.

  • cloud_ssd: SSD云盘.

  • cloud_auto: ESSD云盘云盘 AutoPL云盘.

  • cloud_essd: ESSD云盘云盘.

  • cloud_essd_entry: ESSD云盘云盘 Entry disk.

对于已停售实例类型的非I/O优化实例,默认值为cloud;对于其他类型的实例,默认值为cloud_efficiency。

SystemDiskDeleteWithInstance

Boolean

实例释放时是否释放系统盘。

SystemDiskDescription

String

系统盘描述。

描述长度必须为2256个字符,且不能以http://或https://开头。

SystemDiskDiskName

String

系统盘名称.。

名称长度必须为2128个字符. 名称必须以字母开头,且不能以http://或https://开头. 名称可以包含字母、数字、冒号(:)、下划线(_)和连字符(-)。

SystemDiskEncrypted

String

是否加密系统盘。

取值范围:

  • true

  • false

默认值: false.

SystemDiskIops

Integer

系统盘每秒I/O次数。

SystemDiskPerformanceLevel

String

创建ESSD云盘作为系统盘时,设置云盘的性能等级。

SystemDisk.Category=cloud_essd时,此参数有返回值。取值范围:

  • PL0: 单盘最高随机读写IOPS1

  • PL1: 单盘最高随机读写IOPS5

  • PL2: 单盘最高随机读写IOPS10

  • PL3: 单盘最高随机读写IOPS100

SystemDiskProvisionedIops

Integer

系统盘ESSD云盘 AutoPL云盘的预配置读写IOPS.

SystemDiskSize

Integer

系统盘大小。

单位: GiB.

Tags

List

基于启动模板版本创建的ECS实例、磁盘和主弹性网卡的标签.

更多信息,请参考Tags属性

UserData

String

实例用户数据。

用户数据必须以Base64编码。原始数据的最大大小为32 KB。

VpcId

String

创建ECS实例的专有网络ID。

VSwitchId

String

连接实例的交换机ID。

如果指定了VpcId参数,则此参数必填。

ZoneId

String

实例所属的可用区ID。

DataDisks语法

"DataDisks": [
  {
    "BurstingEnabled": Boolean,
    "SnapshotId": String,
    "Category": String,
    "Description": String,
    "Encrypted": String,
    "Device": String,
    "PerformanceLevel": String,
    "Size": Integer,
    "DeleteWithInstance": Boolean,
    "AutoSnapshotPolicyId": String,
    "ProvisionedIops": Integer,
    "DiskName": String
  }
]

DataDisks属性

属性名称

类型

必须

允许更新

描述

约束

AutoSnapshotPolicyId

String

应用于数据盘的自动快照策略ID。

BurstingEnabled

Boolean

是否启用性能突发功能。

Category

String

数据盘类型。

取值范围:

  • cloud: 普通云盘.

  • cloud_efficiency: 高效云盘。

  • cloud_ssd: SSD云盘.

  • cloud_auto: ESSD云盘云盘 AutoPL云盘.

  • cloud_essd: ESSD云盘云盘.

  • cloud_essd_entry: ESSD云盘云盘 Entry disk.

对于I/O优化实例,默认值为cloud_efficiency;对于非I/O优化实例,默认值为cloud。

DeleteWithInstance

Boolean

数据盘是否随实例释放而释放。

Description

String

数据盘描述。

描述长度必须为2256个字符,且不能以http://或https://开头。

Device

String

数据盘设备名.。

DiskName

String

数据盘名称。

名称长度必须为2128个字符. 名称必须以字母开头,且不能以http://或https://开头. 名称可以包含字母、数字、冒号(:)、下划线(_)和连字符(-)。

Encrypted

String

是否加密数据盘。

PerformanceLevel

String

创建ESSD云盘作为数据盘时,设置云盘的性能等级。

Category=cloud_essd时,此参数有返回值。取值范围:

  • PL0: 单盘最高随机读写IOPS1

  • PL1: 单盘最高随机读写IOPS5

  • PL2: 单盘最高随机读写IOPS10

  • PL3: 单盘最高随机读写IOPS100

ProvisionedIops

Integer

数据盘ESSD云盘 AutoPL云盘的预配置读写IOPS。

Size

Integer

数据盘大小。

SnapshotId

String

数据盘使用的快照ID。

NetworkInterfaces语法

"NetworkInterfaces": [
  {
    "NetworkInterfaceTrafficMode": String,
    "Description": String,
    "SecurityGroupId": String,
    "VSwitchId": String,
    "NetworkInterfaceName": String,
    "PrimaryIpAddress": String,
    "InstanceType": String,
    "SecurityGroupIds": List
  }
]

NetworkInterfaces属性

属性名称

类型

必须

允许更新

描述

约束

Description

String

辅助网卡描述。

描述长度必须为2256个字符,且不能以http://或https://开头。

InstanceType

String

网卡类型。

NetworkInterfaceName

String

辅助网卡名称。

NetworkInterfaceTrafficMode

String

主网卡的通信模式.

取值范围:

  • Standard: 使用TCP通信模式。

  • HighPerformance: 使用远程直接内存访问(RDMA)通信模式,并启用弹性RDMA接口(ERI)。

PrimaryIpAddress

String

辅助网卡的主私网IP地址。

SecurityGroupId

String

辅助网卡所属的安全组ID。

SecurityGroupIds

List

辅助网卡加入的一个或多个安全组。

最多支持配置16组安全组。

VSwitchId

String

连接辅助网卡的交换机ID。

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

Value

String

标签值。

返回值

Fn::GetAtt

  • LaunchTemplateData:启动模板配置.

  • LaunchTemplateName:启动模板名称.

  • VersionDescription:启动模板版本描述.

  • CreatedBy:创建启动模板的阿里云账号ID.

  • ModifiedTime:启动模板版本的修改时间.

  • ResourceGroupId:实例所属的资源组ID.

  • DefaultVersion:是否为启动模板的默认版本.

  • CreateTime:启动模板版本的创建时间.

  • LaunchTemplateId:启动模板ID.

  • VersionNumber:创建的启动模板版本号.

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  LaunchTemplateName:
    Type: String
    Description:
      en: The name of the launch template. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
    MinLength: 2
    MaxLength: 128
    Default: Null
    Required: false
  LaunchTemplateData:
    Description:
      en: The configurations of the launch template.
    Required: false
    Default: Null
    Type: Json
    AssociationPropertyMetadata:
      Parameters:
        PasswordInherit:
          Type: Boolean
          Description:
            en: 'Specifies whether to use the password that is preconfigured in the image. '
          Default: Null
          Required: false
        SystemDiskDeleteWithInstance:
          Type: Boolean
          Description:
            en: Specifies whether to release the system disk when the instance is released.
          Default: Null
          Required: false
        SystemDiskAutoSnapshotPolicyId:
          Type: String
          Description:
            en: The ID of the automatic snapshot policy to apply to the system disk.
          Default: Null
          Required: false
        Period:
          Type: Number
          Description:
            en: 'The subscription period of the instance. Unit: months. This parameter is valid and required only when InstanceChargeType is set to PrePaid. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.'
          AssociationProperty: PayPeriod
          AllowedValues:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 12
            - 24
            - 36
            - 48
            - 60
          Default: Null
          Required: false
        SystemDiskIops:
          Type: Number
          Description:
            en: |-
              System disk I/O times per second.
              > This parameter is about to stop using. To improve code compatibility, please try to use other parameters.
          Default: Null
          Required: false
        SpotPriceLimit:
          Type: Number
          Description:
            en: Set the maximum price per hour for the instance.
          Default: Null
          Required: false
        IoOptimized:
          Type: String
          Description:
            en: Specifies whether to create an I/O optimized instance.
          Default: Null
          Required: false
        SystemDiskProvisionedIops:
          Type: Number
          Description:
            en: The pre-configured read and write IOPS of the system disk ESSD AutoPL cloud disk.
          Default: Null
          Required: false
        InternetChargeType:
          Type: String
          Description:
            en: |-
              Public network bandwidth billing method. Valid values: 
              * PayByBandwidth: pay-by-bandwidth.
              * PayByTraffic: pay-by-traffic.
          AssociationPropertyMetadata:
            LocaleKey: InternetChargeType
          AllowedValues:
            - PayByTraffic
            - PayByBandwidth
          Required: false
          Default: Null
        PrivateIpAddress:
          Type: String
          Description:
            en: The private IP address to assign to the instance. To assign a private IP address to an instance of the VPC type, make sure that the IP address is an idle IP address within the CIDR block of the vSwitch specified by the VSwitchId parameter.
          Default: Null
          Required: false
        KeyPairName:
          Type: String
          Description:
            en: |-
              The name of the key pair to bind to the instance. 
              * For Windows instances, this parameter is ignored The Password parameter is valid even if the KeyPairName parameter is specified.
              * For Linux instances, the password-based logon method is disabled by default.
          Default: Null
          Required: false
        SystemDiskDiskName:
          Type: String
          Description:
            en: The name of the system disk. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
          MinLength: 2
          MaxLength: 128
          Default: Null
          Required: false
        VpcId:
          Type: String
          Description:
            en: The ID of the virtual private cloud (VPC) in which to create the ECS instance.
          AssociationProperty: ALIYUN::ECS::VPC::VPCId
          Default: Null
          Required: false
        Description:
          Type: String
          Description:
            en: The description of the instance. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
          AssociationProperty: TextArea
          MinLength: 2
          MaxLength: 256
          Default: Null
          Required: false
        DeploymentSetId:
          Type: String
          Description:
            en: The ID of the deployment set to which to deploy the instance.
          Default: Null
          Required: false
        Tags:
          Description:
            en: The tags to add to the ECS instance, disks, and primary elastic network interface (ENI) created based on the launch template version.
          Required: false
          Default: Null
          Type: Json
          MinLength: 0
          MaxLength: 20
          AssociationProperty: List[Parameters]
          AssociationPropertyMetadata:
            Parameters:
              Key:
                Type: String
                Description:
                  en: The tag key of the instance.
                Default: Null
                Required: false
              Value:
                Type: String
                Description:
                  en: The tag value of the instance.
                Default: Null
                Required: false
            ListMetadata:
              Order:
                - Key
                - Value
        SystemDiskBurstingEnabled:
          Type: Boolean
          Description:
            en: Specifies whether to enable the performance burst feature.
          Default: Null
          Required: false
        HostName:
          Type: String
          Description:
            en: |-
              The hostname of the instance.
              * The hostname cannot start or end with a period (.) or hyphen (-). It cannot contain consecutive periods (.) or hyphens (-).
              * For Windows instances, the hostname must be 2 to 15 characters in length and cannot contain periods (.) or contain only digits. It can contain letters, digits, and hyphens (-).
              * For instances that run other operating systems 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 (-).
          MinLength: 2
          MaxLength: 64
          Default: Null
          Required: false
        ImageId:
          Type: String
          Description:
            en: The ID of the image to use to create the Elastic Compute Service (ECS) instance.
          Default: Null
          Required: false
        InstanceChargeType:
          Type: String
          Description:
            en: |-
              The billing method of the instance. Valid values:
              * PrePaid: subscription. If you set this parameter to PrePaid, make sure that your account has sufficient credits. Otherwise, an InvalidPayMethod error is returned.
              * PostPaid: pay-as-you-go.
          AssociationPropertyMetadata:
            LocaleKey: InstanceChargeType
          AllowedValues:
            - PostPaid
            - PrePaid
          Required: false
          Default: Null
        VSwitchId:
          Type: String
          Description:
            en: The ID of the vSwitch to which to connect the instance. This parameter is required if you specify the VpcId parameter.
          AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
          AssociationPropertyMetadata:
            ZoneId: ${ZoneId}
            VpcId: ${VpcId}
          Default: Null
          Required: false
        SecurityEnhancementStrategy:
          Type: String
          Description:
            en: |-
              Specifies whether to enable security hardening for the operating system. Valid values: 
              * Active: Security hardening is enabled. This value is applicable only to public images.
              * Deactive: Security hardening is disabled. This value is available to all types of images.
          AllowedValues:
            - Active
            - Deactive
          Default: Null
          Required: false
        InstanceType:
          Type: String
          Description:
            en: The instance type.
          Default: Null
          Required: false
        NetworkInterfaces:
          Description:
            en: The information of the elastic network interfaces (ENIs).
          Required: false
          Default: Null
          Type: Json
          MinLength: 0
          MaxLength: 8
          AssociationProperty: List[Parameter]
          AssociationPropertyMetadata:
            Parameter:
              Description:
                en: 'The information of ENI '
              Required: false
              Default: Null
              Type: Json
              AssociationPropertyMetadata:
                Parameters:
                  Description:
                    Type: String
                    Description:
                      en: The description of the secondary ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
                    AssociationProperty: TextArea
                    MinLength: 2
                    MaxLength: 256
                    Default: Null
                    Required: false
                  SecurityGroupId:
                    Type: String
                    Description:
                      en: |-
                        The ID of the security group to which the secondary Eni belongs. Must be a security group under the same VPC.
                        > SecurityGroupId and SecurityGroupIds do not return values at the same time.
                    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
                    AssociationPropertyMetadata:
                      VpcId: ${VpcId}
                    Default: Null
                    Required: false
                  PrimaryIpAddress:
                    Type: String
                    Description:
                      en: The primary private IP address of the secondary Eni.
                    Default: Null
                    Required: false
                  VSwitchId:
                    Type: String
                    Description:
                      en: The ID of the vSwitch to which to connect the secondary ENI. The instance and the secondary ENI must reside in the same zone of the same VPC, but they can be connected to different VSwitches.
                    AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
                    AssociationPropertyMetadata:
                      ZoneId: ${ZoneId}
                      VpcId: ${VpcId}
                    Default: Null
                    Required: false
                  SecurityGroupIds:
                    Description:
                      en: One or more security groups to which the secondary ENI is attached.
                    Required: false
                    Default: Null
                    Type: Json
                    MinLength: 0
                    MaxLength: 16
                    AssociationProperty: List[Parameter]
                    AssociationPropertyMetadata:
                      Parameter:
                        Type: String
                        Description:
                          en: |-
                            One or more security groups to which the secondary ENI is attached.
                            > SecurityGroupId and SecurityGroupIds do not return values at the same time.
                        AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
                        AssociationPropertyMetadata:
                          VpcId: ${VpcId}
                        Default: Null
                        Required: false
                  NetworkInterfaceTrafficMode:
                    Type: String
                    Description:
                      en: |-
                        The communication mode of the primary ENI. Valid values: 
                        * Standard: uses the TCP communication mode.
                        * HighPerformance: uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
                    AllowedValues:
                      - Standard
                      - HighPerformance
                    Default: Null
                    Required: false
                  InstanceType:
                    Type: String
                    Description:
                      en: The type of the ENI.
                    Default: Null
                    Required: false
                  NetworkInterfaceName:
                    Type: String
                    Description:
                      en: The name of the secondary ENI.
                    Default: Null
                    Required: false
        AutoReleaseTime:
          Type: String
          Description:
            en: |-
              The automatic release time of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. 
              * If the value of ss is not 00, the time is automatically rounded down to the nearest minute based on the value of mm.
              * The specified time must be at least 30 minutes later than the current time.
              * The specified time can be at most three years later than the current time.
          Default: Null
          Required: false
        SystemDiskCategory:
          Type: String
          Description:
            en: |-
              The category of the system disk. Valid values:
              * cloud: basic disk.
              * cloud_efficiency: ultra disk.
              * cloud_ssd: standard SSD.
              * cloud_auto: Enterprise SSD (ESSD) AutoPL disk.
              * cloud_essd: ESSD. 
              * cloud_essd_entry: ESSD Entry disk.
              For non-I/O optimized instances of retired instance types, the default value is cloud. For other types of instances, the default value is cloud_efficiency.
          Default: Null
          Required: false
        DeletionProtection:
          Type: Boolean
          Description:
            en: Specifies whether to enable release protection for the instance.
          Default: Null
          Required: false
        SystemDiskSize:
          Type: Number
          Description:
            en: 'The size of the system disk. Unit: GiB.'
          MinValue: 20
          MaxValue: 2048
          Default: Null
          Required: false
        EnableVmOsConfig:
          Type: Boolean
          Description:
            en: Specifies whether to enable the operating system configuration of the instance.
          Default: Null
          Required: false
        ZoneId:
          Type: String
          Description:
            en: The ID of the zone to which the instance belongs.
          AssociationProperty: ZoneId
          Default: Null
          Required: false
        InternetMaxBandwidthOut:
          Type: Number
          Description:
            en: 'The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100.'
          MinValue: 0
          MaxValue: 100
          Default: Null
          Required: false
        ImageOwnerAlias:
          Type: String
          Description:
            en: The source of the image.
          Default: Null
          Required: false
        SpotStrategy:
          Type: String
          Description:
            en: |-
              The preemption policy for the pay-as-you-go instance. This parameter is valid only when the InstanceChargeType parameter is set to PostPaid. Default value: NoSpot. Valid values: 
              * NoSpot: The instance is created as a pay-as-you-go instance.
              * SpotWithPriceLimit: The instances of the compute node are spot instances. These types of instances have a specified maximum hourly price.
              * SpotAsPriceGo: The instance is created as a spot instance for which the market price at the time of purchase is automatically used as the bid price.
          AllowedValues:
            - NoSpot
            - SpotWithPriceLimit
            - SpotAsPriceGo
          Default: Null
          Required: false
        SecurityGroupIds:
          Description:
            en: One or more security groups to which the instance is added.
          Required: false
          Default: Null
          Type: Json
          MinLength: 0
          MaxLength: 16
          AssociationProperty: List[Parameter]
          AssociationPropertyMetadata:
            Parameter:
              Type: String
              Description:
                en: |-
                  One or more security groups to which the instance is added.
                  > 'SecurityGroupId' and 'SecurityGroupIds' do not return values at the same time.
              AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
              AssociationPropertyMetadata:
                VpcId: ${VpcId}
              Default: Null
              Required: false
        InstanceName:
          Type: String
          Description:
            en: The instance name. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). The default value of this parameter is the InstanceId value.
          MinLength: 2
          MaxLength: 128
          Default: Null
          Required: false
        InternetMaxBandwidthIn:
          Type: Number
          Description:
            en: |-
              The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:* When the purchased outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of this parameter are 1 to 10 and the default value is 10.
              * If the purchased outbound public bandwidth is greater than 10 Mbit/s, the valid values of this parameter range from 1 to the InternetMaxBandwidthOut value and the default value is the InternetMaxBandwidthOut value.
          Default: Null
          Required: false
        DataDisks:
          Description:
            en: A collection of data disks.
          Required: false
          Default: Null
          Type: Json
          MinLength: 0
          MaxLength: 16
          AssociationProperty: List[Parameters]
          AssociationPropertyMetadata:
            Parameters:
              Category:
                Type: String
                Description:
                  en: |-
                    The category of data disk. Valid values:
                    * cloud: basic disk.
                    * cloud_efficiency: utra disk.
                    * cloud_ssd: standard SSD.
                    * cloud_auto: ESSD AutoPL disk.
                    * cloud_essd: ESSD.
                    * cloud_essd_entry: ESSD Entry disk.
                    For I/O optimized instances, the default value is cloud_efficiency. For non-I/O optimized instances, the default value is cloud.
                Default: Null
                Required: false
              BurstingEnabled:
                Type: Boolean
                Description:
                  en: Specifies whether to enable the performance burst feature for the data disk.
                Default: Null
                Required: false
              Description:
                Type: String
                Description:
                  en: "\tThe description of data disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://."
                AssociationProperty: TextArea
                MinLength: 2
                MaxLength: 256
                Default: Null
                Required: false
              AutoSnapshotPolicyId:
                Type: String
                Description:
                  en: The ID of the automatic snapshot policy to apply to data disk
                Default: Null
                Required: false
              Encrypted:
                Type: String
                Description:
                  en: Specifies whether to encrypt data disk
                Default: Null
                Required: false
              DeleteWithInstance:
                Type: Boolean
                Description:
                  en: Whether the data disk is released with the release of the instance.
                Default: Null
                Required: false
              ProvisionedIops:
                Type: Number
                Description:
                  en: The pre-configured read and write IOPS of the data disk ESSD AutoPL cloud disk.
                Default: Null
                Required: false
              Device:
                Type: String
                Description:
                  en: |-
                    The device name of the data disk.
                    > This parameter is about to stop using. In order to improve code compatibility, it is recommended that you try not to use this parameter.
                Default: Null
                Required: false
              SnapshotId:
                Type: String
                Description:
                  en: The ID of the snapshot used by the data disk.
                Default: Null
                Required: false
              DiskName:
                Type: String
                Description:
                  en: The name of data disk. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
                MinLength: 2
                MaxLength: 128
                Default: Null
                Required: false
              PerformanceLevel:
                Type: String
                Description:
                  en: |-
                    When creating an ESSD cloud disk for use as a data disk, set the performance level of the cloud disk. This parameter has a return value when 'Category = cloud_essd. Possible values:
                    - PL0: The highest random read-write IOPS 10,000 per disk.
                    - PL1: The highest random read-write IOPS 50,000 per disk.
                    - PL2: The highest random read-write IOPS 100,000 per disk.
                    - PL3: The highest random read-write IOPS 1 million per disk.
                AllowedValues:
                  - PL0
                  - PL1
                  - PL2
                  - PL3
                Default: Null
                Required: false
              Size:
                Type: Number
                Description:
                  en: The size of data disk.
                Default: Null
                Required: false
        UserData:
          Type: String
          Description:
            en: The user data of the instance. The user data must be encoded in Base64. The maximum size of raw data is 32 KB.
          AssociationProperty: TextArea
          Default: Null
          Required: false
        SpotDuration:
          Type: Number
          Description:
            en: |-
              The retention period of a preemptible instance, in hours. Possible value: 0~6
              - The reserved duration is 2~6 and is under invitation test. Please submit the work order if you need to open it.
              - If the value is 0, it is the unprotected period mode.
          Default: Null
          Required: false
        SecurityGroupId:
          Type: String
          Description:
            en: |-
              The ID of the security group of the instance.
              > 'SecurityGroupId' and 'SecurityGroupIds' do not return values at the same time.
          AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
          AssociationPropertyMetadata:
            VpcId: ${VpcId}
          Default: Null
          Required: false
        Ipv6AddressCount:
          Type: Number
          Description:
            en: 'The number of IPv6 addresses to randomly generate for the primary elastic network interface (ENI). Valid values: 1 to 10.'
          MinValue: 1
          MaxValue: 10
          Default: Null
          Required: false
        SystemDiskEncrypted:
          Type: String
          Description:
            en: |-
              Specifies whether to encrypt the system disk. Valid values: 
              * true
              * false
              Default value: false.
          Default: Null
          Required: false
        RamRoleName:
          Type: String
          Description:
            en: 'The name of the instance Resource Access Management (RAM) role. '
          Default: Null
          Required: false
        SystemDiskDescription:
          Type: String
          Description:
            en: The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
          MinLength: 2
          MaxLength: 256
          Default: Null
          Required: false
        NetworkType:
          Type: String
          Description:
            en: |-
              The network type of the instance. Valid values:
              * classic: classic network
              * vpc: VPC.
          AllowedValues:
            - vpc
            - classic
          Default: Null
          Required: false
        SystemDiskPerformanceLevel:
          Type: String
          Description:
            en: |-
              When creating an ESSD cloud disk for use as a system disk, set the performance level of the cloud disk. This parameter has a return value when 'SystemDisk.Category = cloud_essd. Possible values:
              - PL0: The highest random read-write IOPS 10,000 per disk.
              - PL1: The highest random read-write IOPS 50,000 per disk.
              - PL2: The highest random read-write IOPS 100,000 per disk.
              - PL3: The highest random read-write IOPS 1 million per disk.
          AllowedValues:
            - PL0
            - PL1
            - PL2
            - PL3
          Default: Null
          Required: false
  LaunchTemplateId:
    Type: String
    Description:
      en: The ID of the launch template. You must specify LaunchTemplateId or LaunchTemplateName to specify a launch template.
    Default: Null
    Required: false
  VersionDescription:
    Type: String
    Description:
      en: The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    MinLength: 2
    MaxLength: 256
    Default: Null
    Required: false
Resources:
  ExtensionResource:
    Type: ALIYUN::ECS::LaunchTemplateVersion
    Properties:
      LaunchTemplateName:
        Ref: LaunchTemplateName
      LaunchTemplateData:
        Ref: LaunchTemplateData
      LaunchTemplateId:
        Ref: LaunchTemplateId
      VersionDescription:
        Ref: VersionDescription
Outputs:
  VersionDescription:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VersionDescription
    Description: The description of the launch template version.
  ModifiedTime:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ModifiedTime
    Description: The time when the launch template version was modified.
  LaunchTemplateData:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - LaunchTemplateData
    Description: The configurations of the launch template.
  LaunchTemplateName:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - LaunchTemplateName
    Description: The name of the launch template.
  ResourceGroupId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceGroupId
    Description: The ID of the resource group to which to assign the instance.
  VersionNumber:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VersionNumber
    Description: The number of the created version of the launch template.
  CreatedBy:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreatedBy
    Description: The ID of the Alibaba Cloud account that created the launch template.
  LaunchTemplateId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - LaunchTemplateId
    Description: The ID of the launch template.
  DefaultVersion:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DefaultVersion
    Description: Indicates whether the launch template version is the default version.
  CreateTime:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
    Description: The time when the launch template version was created.
                      
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "LaunchTemplateName": {
      "Type": "String",
      "Description": {
        "en": "The name of the launch template. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-)."
      },
      "MinLength": 2,
      "MaxLength": 128,
      "Default": null,
      "Required": false
    },
    "LaunchTemplateData": {
      "Description": {
        "en": "The configurations of the launch template."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "PasswordInherit": {
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to use the password that is preconfigured in the image. "
            },
            "Default": null,
            "Required": false
          },
          "SystemDiskDeleteWithInstance": {
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to release the system disk when the instance is released."
            },
            "Default": null,
            "Required": false
          },
          "SystemDiskAutoSnapshotPolicyId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the automatic snapshot policy to apply to the system disk."
            },
            "Default": null,
            "Required": false
          },
          "Period": {
            "Type": "Number",
            "Description": {
              "en": "The subscription period of the instance. Unit: months. This parameter is valid and required only when InstanceChargeType is set to PrePaid. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60."
            },
            "AssociationProperty": "PayPeriod",
            "AllowedValues": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              12,
              24,
              36,
              48,
              60
            ],
            "Default": null,
            "Required": false
          },
          "SystemDiskIops": {
            "Type": "Number",
            "Description": {
              "en": "System disk I/O times per second.\n> This parameter is about to stop using. To improve code compatibility, please try to use other parameters."
            },
            "Default": null,
            "Required": false
          },
          "SpotPriceLimit": {
            "Type": "Number",
            "Description": {
              "en": "Set the maximum price per hour for the instance."
            },
            "Default": null,
            "Required": false
          },
          "IoOptimized": {
            "Type": "String",
            "Description": {
              "en": "Specifies whether to create an I/O optimized instance."
            },
            "Default": null,
            "Required": false
          },
          "SystemDiskProvisionedIops": {
            "Type": "Number",
            "Description": {
              "en": "The pre-configured read and write IOPS of the system disk ESSD AutoPL cloud disk."
            },
            "Default": null,
            "Required": false
          },
          "InternetChargeType": {
            "Type": "String",
            "Description": {
              "en": "Public network bandwidth billing method. Valid values: \n* PayByBandwidth: pay-by-bandwidth.\n* PayByTraffic: pay-by-traffic."
            },
            "AssociationPropertyMetadata": {
              "LocaleKey": "InternetChargeType"
            },
            "AllowedValues": [
              "PayByTraffic",
              "PayByBandwidth"
            ],
            "Required": false,
            "Default": null
          },
          "PrivateIpAddress": {
            "Type": "String",
            "Description": {
              "en": "The private IP address to assign to the instance. To assign a private IP address to an instance of the VPC type, make sure that the IP address is an idle IP address within the CIDR block of the vSwitch specified by the VSwitchId parameter."
            },
            "Default": null,
            "Required": false
          },
          "KeyPairName": {
            "Type": "String",
            "Description": {
              "en": "The name of the key pair to bind to the instance. \n* For Windows instances, this parameter is ignored The Password parameter is valid even if the KeyPairName parameter is specified.\n* For Linux instances, the password-based logon method is disabled by default."
            },
            "Default": null,
            "Required": false
          },
          "SystemDiskDiskName": {
            "Type": "String",
            "Description": {
              "en": "The name of the system disk. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-)."
            },
            "MinLength": 2,
            "MaxLength": 128,
            "Default": null,
            "Required": false
          },
          "VpcId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the virtual private cloud (VPC) in which to create the ECS instance."
            },
            "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
            "Default": null,
            "Required": false
          },
          "Description": {
            "Type": "String",
            "Description": {
              "en": "The description of the instance. The description must be 2 to 256 characters in length and cannot start with http:// or https://."
            },
            "AssociationProperty": "TextArea",
            "MinLength": 2,
            "MaxLength": 256,
            "Default": null,
            "Required": false
          },
          "DeploymentSetId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the deployment set to which to deploy the instance."
            },
            "Default": null,
            "Required": false
          },
          "Tags": {
            "Description": {
              "en": "The tags to add to the ECS instance, disks, and primary elastic network interface (ENI) created based on the launch template version."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "MinLength": 0,
            "MaxLength": 20,
            "AssociationProperty": "List[Parameters]",
            "AssociationPropertyMetadata": {
              "Parameters": {
                "Key": {
                  "Type": "String",
                  "Description": {
                    "en": "The tag key of the instance."
                  },
                  "Default": null,
                  "Required": false
                },
                "Value": {
                  "Type": "String",
                  "Description": {
                    "en": "The tag value of the instance."
                  },
                  "Default": null,
                  "Required": false
                }
              },
              "ListMetadata": {
                "Order": [
                  "Key",
                  "Value"
                ]
              }
            }
          },
          "SystemDiskBurstingEnabled": {
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to enable the performance burst feature."
            },
            "Default": null,
            "Required": false
          },
          "HostName": {
            "Type": "String",
            "Description": {
              "en": "The hostname of the instance.\n* The hostname cannot start or end with a period (.) or hyphen (-). It cannot contain consecutive periods (.) or hyphens (-).\n* For Windows instances, the hostname must be 2 to 15 characters in length and cannot contain periods (.) or contain only digits. It can contain letters, digits, and hyphens (-).\n* For instances that run other operating systems 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 (-)."
            },
            "MinLength": 2,
            "MaxLength": 64,
            "Default": null,
            "Required": false
          },
          "ImageId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the image to use to create the Elastic Compute Service (ECS) instance."
            },
            "Default": null,
            "Required": false
          },
          "InstanceChargeType": {
            "Type": "String",
            "Description": {
              "en": "The billing method of the instance. Valid values:\n* PrePaid: subscription. If you set this parameter to PrePaid, make sure that your account has sufficient credits. Otherwise, an InvalidPayMethod error is returned.\n* PostPaid: pay-as-you-go."
            },
            "AssociationPropertyMetadata": {
              "LocaleKey": "InstanceChargeType"
            },
            "AllowedValues": [
              "PostPaid",
              "PrePaid"
            ],
            "Required": false,
            "Default": null
          },
          "VSwitchId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the vSwitch to which to connect the instance. This parameter is required if you specify the VpcId parameter."
            },
            "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
            "AssociationPropertyMetadata": {
              "ZoneId": "${ZoneId}",
              "VpcId": "${VpcId}"
            },
            "Default": null,
            "Required": false
          },
          "SecurityEnhancementStrategy": {
            "Type": "String",
            "Description": {
              "en": "Specifies whether to enable security hardening for the operating system. Valid values: \n* Active: Security hardening is enabled. This value is applicable only to public images.\n* Deactive: Security hardening is disabled. This value is available to all types of images."
            },
            "AllowedValues": [
              "Active",
              "Deactive"
            ],
            "Default": null,
            "Required": false
          },
          "InstanceType": {
            "Type": "String",
            "Description": {
              "en": "The instance type."
            },
            "Default": null,
            "Required": false
          },
          "NetworkInterfaces": {
            "Description": {
              "en": "The information of the elastic network interfaces (ENIs)."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "MinLength": 0,
            "MaxLength": 8,
            "AssociationProperty": "List[Parameter]",
            "AssociationPropertyMetadata": {
              "Parameter": {
                "Description": {
                  "en": "The information of ENI "
                },
                "Required": false,
                "Default": null,
                "Type": "Json",
                "AssociationPropertyMetadata": {
                  "Parameters": {
                    "Description": {
                      "Type": "String",
                      "Description": {
                        "en": "The description of the secondary ENI. The description must be 2 to 256 characters in length and cannot start with http:// or https://."
                      },
                      "AssociationProperty": "TextArea",
                      "MinLength": 2,
                      "MaxLength": 256,
                      "Default": null,
                      "Required": false
                    },
                    "SecurityGroupId": {
                      "Type": "String",
                      "Description": {
                        "en": "The ID of the security group to which the secondary Eni belongs. Must be a security group under the same VPC.\n> SecurityGroupId and SecurityGroupIds do not return values at the same time."
                      },
                      "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
                      "AssociationPropertyMetadata": {
                        "VpcId": "${VpcId}"
                      },
                      "Default": null,
                      "Required": false
                    },
                    "PrimaryIpAddress": {
                      "Type": "String",
                      "Description": {
                        "en": "The primary private IP address of the secondary Eni."
                      },
                      "Default": null,
                      "Required": false
                    },
                    "VSwitchId": {
                      "Type": "String",
                      "Description": {
                        "en": "The ID of the vSwitch to which to connect the secondary ENI. The instance and the secondary ENI must reside in the same zone of the same VPC, but they can be connected to different VSwitches."
                      },
                      "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
                      "AssociationPropertyMetadata": {
                        "ZoneId": "${ZoneId}",
                        "VpcId": "${VpcId}"
                      },
                      "Default": null,
                      "Required": false
                    },
                    "SecurityGroupIds": {
                      "Description": {
                        "en": "One or more security groups to which the secondary ENI is attached."
                      },
                      "Required": false,
                      "Default": null,
                      "Type": "Json",
                      "MinLength": 0,
                      "MaxLength": 16,
                      "AssociationProperty": "List[Parameter]",
                      "AssociationPropertyMetadata": {
                        "Parameter": {
                          "Type": "String",
                          "Description": {
                            "en": "One or more security groups to which the secondary ENI is attached.\n> SecurityGroupId and SecurityGroupIds do not return values at the same time."
                          },
                          "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
                          "AssociationPropertyMetadata": {
                            "VpcId": "${VpcId}"
                          },
                          "Default": null,
                          "Required": false
                        }
                      }
                    },
                    "NetworkInterfaceTrafficMode": {
                      "Type": "String",
                      "Description": {
                        "en": "The communication mode of the primary ENI. Valid values: \n* Standard: uses the TCP communication mode.\n* HighPerformance: uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled."
                      },
                      "AllowedValues": [
                        "Standard",
                        "HighPerformance"
                      ],
                      "Default": null,
                      "Required": false
                    },
                    "InstanceType": {
                      "Type": "String",
                      "Description": {
                        "en": "The type of the ENI."
                      },
                      "Default": null,
                      "Required": false
                    },
                    "NetworkInterfaceName": {
                      "Type": "String",
                      "Description": {
                        "en": "The name of the secondary ENI."
                      },
                      "Default": null,
                      "Required": false
                    }
                  }
                }
              }
            }
          },
          "AutoReleaseTime": {
            "Type": "String",
            "Description": {
              "en": "The automatic release time of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. \n* If the value of ss is not 00, the time is automatically rounded down to the nearest minute based on the value of mm.\n* The specified time must be at least 30 minutes later than the current time.\n* The specified time can be at most three years later than the current time."
            },
            "Default": null,
            "Required": false
          },
          "SystemDiskCategory": {
            "Type": "String",
            "Description": {
              "en": "The category of the system disk. Valid values:\n* cloud: basic disk.\n* cloud_efficiency: ultra disk.\n* cloud_ssd: standard SSD.\n* cloud_auto: Enterprise SSD (ESSD) AutoPL disk.\n* cloud_essd: ESSD. \n* cloud_essd_entry: ESSD Entry disk.\nFor non-I/O optimized instances of retired instance types, the default value is cloud. For other types of instances, the default value is cloud_efficiency."
            },
            "Default": null,
            "Required": false
          },
          "DeletionProtection": {
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to enable release protection for the instance."
            },
            "Default": null,
            "Required": false
          },
          "SystemDiskSize": {
            "Type": "Number",
            "Description": {
              "en": "The size of the system disk. Unit: GiB."
            },
            "MinValue": 20,
            "MaxValue": 2048,
            "Default": null,
            "Required": false
          },
          "EnableVmOsConfig": {
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to enable the operating system configuration of the instance."
            },
            "Default": null,
            "Required": false
          },
          "ZoneId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the zone to which the instance belongs."
            },
            "AssociationProperty": "ZoneId",
            "Default": null,
            "Required": false
          },
          "InternetMaxBandwidthOut": {
            "Type": "Number",
            "Description": {
              "en": "The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100."
            },
            "MinValue": 0,
            "MaxValue": 100,
            "Default": null,
            "Required": false
          },
          "ImageOwnerAlias": {
            "Type": "String",
            "Description": {
              "en": "The source of the image."
            },
            "Default": null,
            "Required": false
          },
          "SpotStrategy": {
            "Type": "String",
            "Description": {
              "en": "The preemption policy for the pay-as-you-go instance. This parameter is valid only when the InstanceChargeType parameter is set to PostPaid. Default value: NoSpot. Valid values: \n* NoSpot: The instance is created as a pay-as-you-go instance.\n* SpotWithPriceLimit: The instances of the compute node are spot instances. These types of instances have a specified maximum hourly price.\n* SpotAsPriceGo: The instance is created as a spot instance for which the market price at the time of purchase is automatically used as the bid price."
            },
            "AllowedValues": [
              "NoSpot",
              "SpotWithPriceLimit",
              "SpotAsPriceGo"
            ],
            "Default": null,
            "Required": false
          },
          "SecurityGroupIds": {
            "Description": {
              "en": "One or more security groups to which the instance is added."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "MinLength": 0,
            "MaxLength": 16,
            "AssociationProperty": "List[Parameter]",
            "AssociationPropertyMetadata": {
              "Parameter": {
                "Type": "String",
                "Description": {
                  "en": "One or more security groups to which the instance is added.\n> 'SecurityGroupId' and 'SecurityGroupIds' do not return values at the same time."
                },
                "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
                "AssociationPropertyMetadata": {
                  "VpcId": "${VpcId}"
                },
                "Default": null,
                "Required": false
              }
            }
          },
          "InstanceName": {
            "Type": "String",
            "Description": {
              "en": "The instance name. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). The default value of this parameter is the InstanceId value."
            },
            "MinLength": 2,
            "MaxLength": 128,
            "Default": null,
            "Required": false
          },
          "InternetMaxBandwidthIn": {
            "Type": "Number",
            "Description": {
              "en": "The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:* When the purchased outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of this parameter are 1 to 10 and the default value is 10.\n* If the purchased outbound public bandwidth is greater than 10 Mbit/s, the valid values of this parameter range from 1 to the InternetMaxBandwidthOut value and the default value is the InternetMaxBandwidthOut value."
            },
            "Default": null,
            "Required": false
          },
          "DataDisks": {
            "Description": {
              "en": "A collection of data disks."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "MinLength": 0,
            "MaxLength": 16,
            "AssociationProperty": "List[Parameters]",
            "AssociationPropertyMetadata": {
              "Parameters": {
                "Category": {
                  "Type": "String",
                  "Description": {
                    "en": "The category of data disk. Valid values:\n* cloud: basic disk.\n* cloud_efficiency: utra disk.\n* cloud_ssd: standard SSD.\n* cloud_auto: ESSD AutoPL disk.\n* cloud_essd: ESSD.\n* cloud_essd_entry: ESSD Entry disk.\nFor I/O optimized instances, the default value is cloud_efficiency. For non-I/O optimized instances, the default value is cloud."
                  },
                  "Default": null,
                  "Required": false
                },
                "BurstingEnabled": {
                  "Type": "Boolean",
                  "Description": {
                    "en": "Specifies whether to enable the performance burst feature for the data disk."
                  },
                  "Default": null,
                  "Required": false
                },
                "Description": {
                  "Type": "String",
                  "Description": {
                    "en": "\tThe description of data disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://."
                  },
                  "AssociationProperty": "TextArea",
                  "MinLength": 2,
                  "MaxLength": 256,
                  "Default": null,
                  "Required": false
                },
                "AutoSnapshotPolicyId": {
                  "Type": "String",
                  "Description": {
                    "en": "The ID of the automatic snapshot policy to apply to data disk"
                  },
                  "Default": null,
                  "Required": false
                },
                "Encrypted": {
                  "Type": "String",
                  "Description": {
                    "en": "Specifies whether to encrypt data disk"
                  },
                  "Default": null,
                  "Required": false
                },
                "DeleteWithInstance": {
                  "Type": "Boolean",
                  "Description": {
                    "en": "Whether the data disk is released with the release of the instance."
                  },
                  "Default": null,
                  "Required": false
                },
                "ProvisionedIops": {
                  "Type": "Number",
                  "Description": {
                    "en": "The pre-configured read and write IOPS of the data disk ESSD AutoPL cloud disk."
                  },
                  "Default": null,
                  "Required": false
                },
                "Device": {
                  "Type": "String",
                  "Description": {
                    "en": "The device name of the data disk.\n> This parameter is about to stop using. In order to improve code compatibility, it is recommended that you try not to use this parameter."
                  },
                  "Default": null,
                  "Required": false
                },
                "SnapshotId": {
                  "Type": "String",
                  "Description": {
                    "en": "The ID of the snapshot used by the data disk."
                  },
                  "Default": null,
                  "Required": false
                },
                "DiskName": {
                  "Type": "String",
                  "Description": {
                    "en": "The name of data disk. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-)."
                  },
                  "MinLength": 2,
                  "MaxLength": 128,
                  "Default": null,
                  "Required": false
                },
                "PerformanceLevel": {
                  "Type": "String",
                  "Description": {
                    "en": "When creating an ESSD cloud disk for use as a data disk, set the performance level of the cloud disk. This parameter has a return value when 'Category = cloud_essd. Possible values:\n- PL0: The highest random read-write IOPS 10,000 per disk.\n- PL1: The highest random read-write IOPS 50,000 per disk.\n- PL2: The highest random read-write IOPS 100,000 per disk.\n- PL3: The highest random read-write IOPS 1 million per disk."
                  },
                  "AllowedValues": [
                    "PL0",
                    "PL1",
                    "PL2",
                    "PL3"
                  ],
                  "Default": null,
                  "Required": false
                },
                "Size": {
                  "Type": "Number",
                  "Description": {
                    "en": "The size of data disk."
                  },
                  "Default": null,
                  "Required": false
                }
              }
            }
          },
          "UserData": {
            "Type": "String",
            "Description": {
              "en": "The user data of the instance. The user data must be encoded in Base64. The maximum size of raw data is 32 KB."
            },
            "AssociationProperty": "TextArea",
            "Default": null,
            "Required": false
          },
          "SpotDuration": {
            "Type": "Number",
            "Description": {
              "en": "The retention period of a preemptible instance, in hours. Possible value: 0~6\n- The reserved duration is 2~6 and is under invitation test. Please submit the work order if you need to open it.\n- If the value is 0, it is the unprotected period mode."
            },
            "Default": null,
            "Required": false
          },
          "SecurityGroupId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the security group of the instance.\n> 'SecurityGroupId' and 'SecurityGroupIds' do not return values at the same time."
            },
            "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
            "AssociationPropertyMetadata": {
              "VpcId": "${VpcId}"
            },
            "Default": null,
            "Required": false
          },
          "Ipv6AddressCount": {
            "Type": "Number",
            "Description": {
              "en": "The number of IPv6 addresses to randomly generate for the primary elastic network interface (ENI). Valid values: 1 to 10."
            },
            "MinValue": 1,
            "MaxValue": 10,
            "Default": null,
            "Required": false
          },
          "SystemDiskEncrypted": {
            "Type": "String",
            "Description": {
              "en": "Specifies whether to encrypt the system disk. Valid values: \n* true\n* false\nDefault value: false."
            },
            "Default": null,
            "Required": false
          },
          "RamRoleName": {
            "Type": "String",
            "Description": {
              "en": "The name of the instance Resource Access Management (RAM) role. "
            },
            "Default": null,
            "Required": false
          },
          "SystemDiskDescription": {
            "Type": "String",
            "Description": {
              "en": "The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://."
            },
            "MinLength": 2,
            "MaxLength": 256,
            "Default": null,
            "Required": false
          },
          "NetworkType": {
            "Type": "String",
            "Description": {
              "en": "The network type of the instance. Valid values:\n* classic: classic network\n* vpc: VPC."
            },
            "AllowedValues": [
              "vpc",
              "classic"
            ],
            "Default": null,
            "Required": false
          },
          "SystemDiskPerformanceLevel": {
            "Type": "String",
            "Description": {
              "en": "When creating an ESSD cloud disk for use as a system disk, set the performance level of the cloud disk. This parameter has a return value when 'SystemDisk.Category = cloud_essd. Possible values:\n- PL0: The highest random read-write IOPS 10,000 per disk.\n- PL1: The highest random read-write IOPS 50,000 per disk.\n- PL2: The highest random read-write IOPS 100,000 per disk.\n- PL3: The highest random read-write IOPS 1 million per disk."
            },
            "AllowedValues": [
              "PL0",
              "PL1",
              "PL2",
              "PL3"
            ],
            "Default": null,
            "Required": false
          }
        }
      }
    },
    "LaunchTemplateId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the launch template. You must specify LaunchTemplateId or LaunchTemplateName to specify a launch template."
      },
      "Default": null,
      "Required": false
    },
    "VersionDescription": {
      "Type": "String",
      "Description": {
        "en": "The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http:// or https://."
      },
      "MinLength": 2,
      "MaxLength": 256,
      "Default": null,
      "Required": false
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ECS::LaunchTemplateVersion",
      "Properties": {
        "LaunchTemplateName": {
          "Ref": "LaunchTemplateName"
        },
        "LaunchTemplateData": {
          "Ref": "LaunchTemplateData"
        },
        "LaunchTemplateId": {
          "Ref": "LaunchTemplateId"
        },
        "VersionDescription": {
          "Ref": "VersionDescription"
        }
      }
    }
  },
  "Outputs": {
    "VersionDescription": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VersionDescription"
        ]
      },
      "Description": "The description of the launch template version."
    },
    "ModifiedTime": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ModifiedTime"
        ]
      },
      "Description": "The time when the launch template version was modified."
    },
    "LaunchTemplateData": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "LaunchTemplateData"
        ]
      },
      "Description": "The configurations of the launch template."
    },
    "LaunchTemplateName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "LaunchTemplateName"
        ]
      },
      "Description": "The name of the launch template."
    },
    "ResourceGroupId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceGroupId"
        ]
      },
      "Description": "The ID of the resource group to which to assign the instance."
    },
    "VersionNumber": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VersionNumber"
        ]
      },
      "Description": "The number of the created version of the launch template."
    },
    "CreatedBy": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreatedBy"
        ]
      },
      "Description": "The ID of the Alibaba Cloud account that created the launch template."
    },
    "LaunchTemplateId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "LaunchTemplateId"
        ]
      },
      "Description": "The ID of the launch template."
    },
    "DefaultVersion": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DefaultVersion"
        ]
      },
      "Description": "Indicates whether the launch template version is the default version."
    },
    "CreateTime": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      },
      "Description": "The time when the launch template version was created."
    }
  }
}