DATASOURCE::ECS::LaunchTemplate is used to query the information about a launch template.
Syntax
{
"Type": "DATASOURCE::ECS::LaunchTemplate",
"Properties": {
"LaunchTemplateId": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
LaunchTemplateId | String | Yes | Yes | The ID of the launch template. | None. |
Return values
Fn::GetAtt
ImageOwnerAlias: the alias of the image owner.
PrivateIpAddress: the private IP address of the Elastic Compute Service (ECS) instance.
Description: the description of the ECS instance.
ResourceGroupId: the ID of the resource group.
TemplateTag: the tags of the launch template.
UserData: the user data of the ECS instance.
InstanceChargeType: the billing method of the ECS instance.
SystemDisk: the system disk configurations of the ECS instance.
RamRoleName: the name of the Resource Access Management (RAM) role of the ECS instance.
ModifiedTime: the modification time.
Ipv6AddressCount: the number of IPv6 addresses generated for the elastic network interface (ENI) at random.
NetworkType: the network type of the ECS instance.
ImageId: the image ID of the ECS instance.
SpotPriceLimit: the maximum hourly price of the ECS instance.
InstanceType: the instance type of the ECS instance.
DefaultVersionNumber: the default version number of the launch template.
Tags: the tags of the launch template.
HostName: the hostname of the ECS instance.
SpotStrategy: the bidding policy for the pay-as-you-go ECS instance.
PasswordInherit: indicates whether the preset password of the image is used.
TemplateResourceGroupId: the ID of the resource group to which the launch template belongs.
KeyPairName: the name of the key pair.
LaunchTemplateName: the name of the launch template.
IoOptimized: indicates whether the ECS instance is an I/O optimized instance.
VersionDescription: the description of the launch template version.
CreatedBy: the creator of the launch template.
ZoneId: the zone ID.
LatestVersionNumber: the most recent version number of the launch template.
VSwitchId: the vSwitch ID of the ECS instance.
CreateTime: the creation time of the launch template.
NetworkInterface: the information about the ENI.
Period: the subscription duration of the ECS instance.
LaunchTemplateId: the ID of the launch template.
DeletionProtection: the deletion protection property of the ECS instance.
SecurityGroupIds: the IDs of the security groups to which the ECS instance belongs.
InternetChargeType: the metering method for public bandwidth.
InstanceName: the name of the ECS instance.
DeploymentSetId: the ID of the deployment set.
DataDisk: details of the data disk.
InternetMaxBandwidthOut: the maximum outbound public bandwidth.
VpcId: the ID of the virtual private cloud (VPC).
InternetMaxBandwidthIn: the maximum inbound public bandwidth.
SecurityEnhancementStrategy: indicates whether security hardening is enabled.
AutoReleaseTime: the automatic release time.
Examples
YAML
formatROSTemplateFormatVersion: '2015-09-01' Parameters: LaunchTemplateId: Type: String Description: en: Template ID. Required: true AssociationProperty: ALIYUN::ECS::LaunchTemplate::LaunchTemplateId Resources: ExtensionDataSource: Type: DATASOURCE::ECS::LaunchTemplate Properties: LaunchTemplateId: Ref: LaunchTemplateId Outputs: ImageOwnerAlias: Description: The source of the image. Value: Fn::GetAtt: - ExtensionDataSource - ImageOwnerAlias PrivateIpAddress: Description: The private IP address of the instance. Value: Fn::GetAtt: - ExtensionDataSource - PrivateIpAddress Description: Description: Instance description. 2 to 256 English or Chinese characters in length and cannot start with' http:// 'or' https. Value: Fn::GetAtt: - ExtensionDataSource - Description ResourceGroupId: Description: The ID of the resource group to which the instance, Elastic Block Storage (EBS) device, and ENI belong. Value: Fn::GetAtt: - ExtensionDataSource - ResourceGroupId TemplateTag: Description: The tags of the launch template. Value: Fn::GetAtt: - ExtensionDataSource - TemplateTag UserData: Description: The user-defined data of the instance must be encoded in Base64. The maximum original data is 16KB. Value: Fn::GetAtt: - ExtensionDataSource - UserData InstanceChargeType: Description: The billing method of the instance. Value: Fn::GetAtt: - ExtensionDataSource - InstanceChargeType SystemDisk: Description: System disk configuration. Value: Fn::GetAtt: - ExtensionDataSource - SystemDisk RamRoleName: Description: The instance RAM role name. You can use the RAM API [ListRoles](~~ 28713 ~~) to query the created instance RAM roles. Value: Fn::GetAtt: - ExtensionDataSource - RamRoleName ModifiedTime: Description: The time when the launch template was modified. Value: Fn::GetAtt: - ExtensionDataSource - ModifiedTime Ipv6AddressCount: Description: Specify the number of randomly generated IPv6 addresses for the primary network card. The value range is 1 to 10. Value: Fn::GetAtt: - ExtensionDataSource - Ipv6AddressCount NetworkType: Description: The network type of the instance. Value: Fn::GetAtt: - ExtensionDataSource - NetworkType ImageId: Description: The ID of the image. Value: Fn::GetAtt: - ExtensionDataSource - ImageId SpotPriceLimit: Description: Set the maximum price per hour for the instance. The maximum number of 3 decimal places is supported. The value of the parameter 'SpotStrategy' is 'SpotWithPriceLimit. Value: Fn::GetAtt: - ExtensionDataSource - SpotPriceLimit InstanceType: Description: The instance type. Value: Fn::GetAtt: - ExtensionDataSource - InstanceType DefaultVersionNumber: Description: The default version number of the template. Value: Fn::GetAtt: - ExtensionDataSource - DefaultVersionNumber Tags: Description: The tags of the launch template. Value: Fn::GetAtt: - ExtensionDataSource - Tags HostName: Description: The hostname of the instance. Value: Fn::GetAtt: - ExtensionDataSource - HostName SpotStrategy: Description: The preemption policy for a pay-as-you-go instance. This parameter takes effect when the value of the parameter 'InstanceChargeType' is 'PostPaid. Value: Fn::GetAtt: - ExtensionDataSource - SpotStrategy PasswordInherit: Description: Whether to use the password preset by the image. Value: Fn::GetAtt: - ExtensionDataSource - PasswordInherit TemplateResourceGroupId: Description: Q Value: Fn::GetAtt: - ExtensionDataSource - TemplateResourceGroupId KeyPairName: Description: The name of the key pair. Value: Fn::GetAtt: - ExtensionDataSource - KeyPairName LaunchTemplateName: Description: The name of the launch template. Value: Fn::GetAtt: - ExtensionDataSource - LaunchTemplateName IoOptimized: Description: Whether to optimize the instance for I/O. Value: Fn::GetAtt: - ExtensionDataSource - IoOptimized VersionDescription: Description: Instance launch template version description. 2 to 256 English or Chinese characters in length and cannot start with' http:// 'or' https. Value: Fn::GetAtt: - ExtensionDataSource - VersionDescription CreatedBy: Description: The creator of the launch template. Value: Fn::GetAtt: - ExtensionDataSource - CreatedBy ZoneId: Description: The ID of the zone to which the instance belongs. Value: Fn::GetAtt: - ExtensionDataSource - ZoneId LatestVersionNumber: Description: The latest version number of the template. Value: Fn::GetAtt: - ExtensionDataSource - LatestVersionNumber VSwitchId: Description: The ID of the vSwitch. Value: Fn::GetAtt: - ExtensionDataSource - VSwitchId CreateTime: Description: The time when the instance launch template was created. Value: Fn::GetAtt: - ExtensionDataSource - CreateTime NetworkInterface: Description: The elastic network interfaces (ENIs). Value: Fn::GetAtt: - ExtensionDataSource - NetworkInterface Period: Description: 'The duration of the purchase of resources, in months. When creating an instance, the parameter ''InstanceChargeType'' takes effect and is required only when the value of the parameter ''PrePaid'' is ''PrePaid. Value range: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60.' Value: Fn::GetAtt: - ExtensionDataSource - Period LaunchTemplateId: Description: The ID of the launch template. Value: Fn::GetAtt: - ExtensionDataSource - LaunchTemplateId DeletionProtection: Description: Instance deletion protection attribute. Value: Fn::GetAtt: - ExtensionDataSource - DeletionProtection SecurityGroupIds: Description: The IDs of one or more security groups to which you want to add the instance. Value: Fn::GetAtt: - ExtensionDataSource - SecurityGroupIds InternetChargeType: Description: Network billing method. Value: Fn::GetAtt: - ExtensionDataSource - InternetChargeType InstanceName: Description: The name of the instance. The length is 2~128 English or Chinese characters. It must start with a large or small letter or Chinese, and cannot start with' http:// 'or' https. It can contain numbers, colons (:), underscores (_), or dashes (-). Value: Fn::GetAtt: - ExtensionDataSource - InstanceName DeploymentSetId: Description: The ID of the deployment set. Value: Fn::GetAtt: - ExtensionDataSource - DeploymentSetId DataDisk: Description: Data disk information list. Value: Fn::GetAtt: - ExtensionDataSource - DataDisk InternetMaxBandwidthOut: Description: The maximum outbound bandwidth of the public network. The unit is Mbit/s. The value range is 0~100. Value: Fn::GetAtt: - ExtensionDataSource - InternetMaxBandwidthOut VpcId: Description: VPC Id. Value: Fn::GetAtt: - ExtensionDataSource - VpcId InternetMaxBandwidthIn: Description: The maximum public inbound bandwidth, in Mbit/s. Value: Fn::GetAtt: - ExtensionDataSource - InternetMaxBandwidthIn SecurityEnhancementStrategy: Description: Whether to turn on security reinforcement for the operating system. Value: Fn::GetAtt: - ExtensionDataSource - SecurityEnhancementStrategy AutoReleaseTime: Description: 'Automatic release time. According to the [ISO8601](~~ 25696 ~~) standard, and need to use UTC time. The format is: yyyy-MM-ddTHH:mm:ssZ.' Value: Fn::GetAtt: - ExtensionDataSource - AutoReleaseTime
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "LaunchTemplateId": { "Type": "String", "Description": { "en": "Template ID." }, "Required": true, "AssociationProperty": "ALIYUN::ECS::LaunchTemplate::LaunchTemplateId" } }, "Resources": { "ExtensionDataSource": { "Type": "DATASOURCE::ECS::LaunchTemplate", "Properties": { "LaunchTemplateId": { "Ref": "LaunchTemplateId" } } } }, "Outputs": { "ImageOwnerAlias": { "Description": "The source of the image.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ImageOwnerAlias" ] } }, "PrivateIpAddress": { "Description": "The private IP address of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "PrivateIpAddress" ] } }, "Description": { "Description": "Instance description. 2 to 256 English or Chinese characters in length and cannot start with' http:// 'or' https.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Description" ] } }, "ResourceGroupId": { "Description": "The ID of the resource group to which the instance, Elastic Block Storage (EBS) device, and ENI belong.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ResourceGroupId" ] } }, "TemplateTag": { "Description": "The tags of the launch template.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "TemplateTag" ] } }, "UserData": { "Description": "The user-defined data of the instance must be encoded in Base64. The maximum original data is 16KB.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "UserData" ] } }, "InstanceChargeType": { "Description": "The billing method of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "InstanceChargeType" ] } }, "SystemDisk": { "Description": "System disk configuration.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SystemDisk" ] } }, "RamRoleName": { "Description": "The instance RAM role name. You can use the RAM API [ListRoles](~~ 28713 ~~) to query the created instance RAM roles.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "RamRoleName" ] } }, "ModifiedTime": { "Description": "The time when the launch template was modified.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ModifiedTime" ] } }, "Ipv6AddressCount": { "Description": "Specify the number of randomly generated IPv6 addresses for the primary network card. The value range is 1 to 10.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Ipv6AddressCount" ] } }, "NetworkType": { "Description": "The network type of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "NetworkType" ] } }, "ImageId": { "Description": "The ID of the image.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ImageId" ] } }, "SpotPriceLimit": { "Description": "Set the maximum price per hour for the instance. The maximum number of 3 decimal places is supported. The value of the parameter 'SpotStrategy' is 'SpotWithPriceLimit.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SpotPriceLimit" ] } }, "InstanceType": { "Description": "The instance type.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "InstanceType" ] } }, "DefaultVersionNumber": { "Description": "The default version number of the template.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DefaultVersionNumber" ] } }, "Tags": { "Description": "The tags of the launch template.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Tags" ] } }, "HostName": { "Description": "The hostname of the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "HostName" ] } }, "SpotStrategy": { "Description": "The preemption policy for a pay-as-you-go instance. This parameter takes effect when the value of the parameter 'InstanceChargeType' is 'PostPaid.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SpotStrategy" ] } }, "PasswordInherit": { "Description": "Whether to use the password preset by the image.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "PasswordInherit" ] } }, "TemplateResourceGroupId": { "Description": "Q", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "TemplateResourceGroupId" ] } }, "KeyPairName": { "Description": "The name of the key pair.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "KeyPairName" ] } }, "LaunchTemplateName": { "Description": "The name of the launch template.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "LaunchTemplateName" ] } }, "IoOptimized": { "Description": "Whether to optimize the instance for I/O.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "IoOptimized" ] } }, "VersionDescription": { "Description": "Instance launch template version description. 2 to 256 English or Chinese characters in length and cannot start with' http:// 'or' https.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "VersionDescription" ] } }, "CreatedBy": { "Description": "The creator of the launch template.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "CreatedBy" ] } }, "ZoneId": { "Description": "The ID of the zone to which the instance belongs.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "ZoneId" ] } }, "LatestVersionNumber": { "Description": "The latest version number of the template.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "LatestVersionNumber" ] } }, "VSwitchId": { "Description": "The ID of the vSwitch.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "VSwitchId" ] } }, "CreateTime": { "Description": "The time when the instance launch template was created.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "CreateTime" ] } }, "NetworkInterface": { "Description": "The elastic network interfaces (ENIs).", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "NetworkInterface" ] } }, "Period": { "Description": "The duration of the purchase of resources, in months. When creating an instance, the parameter 'InstanceChargeType' takes effect and is required only when the value of the parameter 'PrePaid' is 'PrePaid. Value range: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "Period" ] } }, "LaunchTemplateId": { "Description": "The ID of the launch template.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "LaunchTemplateId" ] } }, "DeletionProtection": { "Description": "Instance deletion protection attribute.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DeletionProtection" ] } }, "SecurityGroupIds": { "Description": "The IDs of one or more security groups to which you want to add the instance.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SecurityGroupIds" ] } }, "InternetChargeType": { "Description": "Network billing method.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "InternetChargeType" ] } }, "InstanceName": { "Description": "The name of the instance. The length is 2~128 English or Chinese characters. It must start with a large or small letter or Chinese, and cannot start with' http:// 'or' https. It can contain numbers, colons (:), underscores (_), or dashes (-).", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "InstanceName" ] } }, "DeploymentSetId": { "Description": "The ID of the deployment set.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DeploymentSetId" ] } }, "DataDisk": { "Description": "Data disk information list.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "DataDisk" ] } }, "InternetMaxBandwidthOut": { "Description": "The maximum outbound bandwidth of the public network. The unit is Mbit/s. The value range is 0~100.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "InternetMaxBandwidthOut" ] } }, "VpcId": { "Description": "VPC Id.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "VpcId" ] } }, "InternetMaxBandwidthIn": { "Description": "The maximum public inbound bandwidth, in Mbit/s.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "InternetMaxBandwidthIn" ] } }, "SecurityEnhancementStrategy": { "Description": "Whether to turn on security reinforcement for the operating system.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "SecurityEnhancementStrategy" ] } }, "AutoReleaseTime": { "Description": "Automatic release time. According to the [ISO8601](~~ 25696 ~~) standard, and need to use UTC time. The format is: yyyy-MM-ddTHH:mm:ssZ.", "Value": { "Fn::GetAtt": [ "ExtensionDataSource", "AutoReleaseTime" ] } } } }