全部产品
Search
文档中心

资源编排:DATASOURCE::ECS::LaunchTemplate

更新时间:Aug 12, 2024

DATASOURCE::ECS::LaunchTemplate类型用于查询一个实例启动模板详情。

语法

{
  "Type": "DATASOURCE::ECS::LaunchTemplate",
  "Properties": {
    "LaunchTemplateId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

LaunchTemplateId

String

实例启动模板 ID。

返回值

Fn::GetAtt

  • ImageOwnerAlias:镜像所有者别名。

  • PrivateIpAddress:实例的私有IP地址。

  • Description:实例描述信息。

  • ResourceGroupId:资源组ID。

  • TemplateTag:启动模板的标签列表。

  • UserData:实例的自定义数据。

  • InstanceChargeType:实例的付费类型。

  • SystemDisk:实例的系统盘配置。

  • RamRoleName:实例 RAM 角色名称

  • ModifiedTime:修改时间。

  • Ipv6AddressCount:为弹性网卡指定随机生成的 IPv6 地址数量。

  • NetworkType:ECS 实例的网络类型。

  • ImageId:ECS 实例的镜像ID。

  • SpotPriceLimit:设置实例的每小时最高价格。

  • InstanceType:实例的资源规格。

  • DefaultVersionNumber:模板默认版本号。

  • Tags:启动模板的标签对属性。

  • HostName:实例主机名称。

  • SpotStrategy:按量付费实例的竞价策略。

  • PasswordInherit:是否使用镜像预设的密码。

  • TemplateResourceGroupId:启动模板所在的企业资源组 ID。

  • KeyPairName:密钥对名称。

  • LaunchTemplateName:启动模板名称。

  • IoOptimized:是否为 I/O 优化实例。

  • VersionDescription:模板版本描述。

  • CreatedBy:模板的创建者。

  • ZoneId:可用区 ID。

  • LatestVersionNumber:模板最新版本号。

  • VSwitchId:实例所属的虚拟交换机 ID。

  • CreateTime:模板创建时间。

  • NetworkInterface:弹性网卡信息。

  • Period:购买资源的时长。

  • LaunchTemplateId:模板 ID。

  • DeletionProtection:实例释放保护属性

  • SecurityGroupIds:实例的安全组 ID列表。

  • InternetChargeType:公网带宽计费方式。

  • InstanceName:实例名称。

  • DeploymentSetId:部署集 ID。

  • DataDisk:数据盘集合。

  • InternetMaxBandwidthOut:公网出带宽最大值。

  • VpcId:专有网络 VPC ID。

  • InternetMaxBandwidthIn:公网入带宽最大值。

  • SecurityEnhancementStrategy:是否开启安全加固。

  • AutoReleaseTime:自动释放时间。

示例

  • 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"
            ]
          }
        }
      }
    }