DATASOURCE::ECS::LaunchTemplate
DATASOURCE::ECS::LaunchTemplate類型用于查詢一個(gè)實(shí)例啟動模板詳情。
語法
{
"Type": "DATASOURCE::ECS::LaunchTemplate",
"Properties": {
"LaunchTemplateId": String
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
LaunchTemplateId | String | 是 | 是 | 實(shí)例啟動模板 ID。 | 無 |
返回值
Fn::GetAtt
ImageOwnerAlias:鏡像所有者別名。
PrivateIpAddress:實(shí)例的私有IP地址。
Description:實(shí)例描述信息。
ResourceGroupId:資源組ID。
TemplateTag:啟動模板的標(biāo)簽列表。
UserData:實(shí)例的自定義數(shù)據(jù)。
InstanceChargeType:實(shí)例的付費(fèi)類型。
SystemDisk:實(shí)例的系統(tǒng)盤配置。
RamRoleName:實(shí)例 RAM 角色名稱。
ModifiedTime:修改時(shí)間。
Ipv6AddressCount:為彈性網(wǎng)卡指定隨機(jī)生成的 IPv6 地址數(shù)量。
NetworkType:ECS 實(shí)例的網(wǎng)絡(luò)類型。
ImageId:ECS 實(shí)例的鏡像ID。
SpotPriceLimit:設(shè)置實(shí)例的每小時(shí)最高價(jià)格。
InstanceType:實(shí)例的資源規(guī)格。
DefaultVersionNumber:模板默認(rèn)版本號。
Tags:啟動模板的標(biāo)簽對屬性。
HostName:實(shí)例主機(jī)名稱。
SpotStrategy:按量付費(fèi)實(shí)例的競價(jià)策略。
PasswordInherit:是否使用鏡像預(yù)設(shè)的密碼。
TemplateResourceGroupId:啟動模板所在的企業(yè)資源組 ID。
KeyPairName:密鑰對名稱。
LaunchTemplateName:啟動模板名稱。
IoOptimized:是否為 I/O 優(yōu)化實(shí)例。
VersionDescription:模板版本描述。
CreatedBy:模板的創(chuàng)建者。
ZoneId:可用區(qū) ID。
LatestVersionNumber:模板最新版本號。
VSwitchId:實(shí)例所屬的虛擬交換機(jī) ID。
CreateTime:模板創(chuàng)建時(shí)間。
NetworkInterface:彈性網(wǎng)卡信息。
Period:購買資源的時(shí)長。
LaunchTemplateId:模板 ID。
DeletionProtection:實(shí)例釋放保護(hù)屬性。
SecurityGroupIds:實(shí)例的安全組 ID列表。
InternetChargeType:公網(wǎng)帶寬計(jì)費(fèi)方式。
InstanceName:實(shí)例名稱。
DeploymentSetId:部署集 ID。
DataDisk:數(shù)據(jù)盤集合。
InternetMaxBandwidthOut:公網(wǎng)出帶寬最大值。
VpcId:專有網(wǎng)絡(luò) VPC ID。
InternetMaxBandwidthIn:公網(wǎng)入帶寬最大值。
SecurityEnhancementStrategy:是否開啟安全加固。
AutoReleaseTime:自動釋放時(shí)間。
示例
YAML
格式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
JSON
格式{ "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" ] } } } }