All Products
Search
Document Center

Elastic Compute Service:DescribeLaunchTemplateVersions

Last Updated:Mar 19, 2024

Queries the versions of a launch template.

Operation description

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the launch template.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
LaunchTemplateVersionarrayNo

Version N of the launch template.

longNo

Version N of the launch template.

1
LaunchTemplateIdstringNo

The ID of the launch template.

You must set LaunchTemplateId or LaunchTemplateName to specify a launch template.

lt-bp168lnahrdwl39p****
LaunchTemplateNamestringNo

The name of the launch template.

testLaunchTemplateName
MinVersionlongNo

The minimum version number in the version range to query.

1
MaxVersionlongNo

The maximum version number in the version range to query.

10
DefaultVersionbooleanNo

Specifies whether to query the default version.

true
DetailFlagbooleanNo

Specifies whether to query the configurations of the launch template. Valid values:

  • true: queries the basic information and other details of the launch template. The details include the image ID and system disk size.
  • false: queries only the basic information of the launch template. The basic information includes the template ID, template name, and default version.

Default value: true.

true
PageNumberintegerNo

The number of the page to return.

Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page.

Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object

test

PageSizeinteger

The number of entries returned per page.

10
RequestIdstring

The ID of the request.

3989ED0C-20A1-4351-A127-2067FF8390AX
PageNumberinteger

The page number of the returned page.

1
TotalCountinteger

The total number of launch templates.

1
LaunchTemplateVersionSetsobject []

Details about the launch template versions.

LaunchTemplateNamestring

The name of the launch template.

testLaunchTemplateName
DefaultVersionboolean

Indicates whether the launch template version is the default version.

true
VersionNumberlong

The number of the launch template version.

1
ModifiedTimestring

The time when the launch template was modified.

2022-01-17T08:40:00Z
LaunchTemplateIdstring

The ID of the launch template.

lt-bp67acfmxazb4p****
CreateTimestring

The time when the launch template was created.

2022-01-17T08:22:43Z
CreatedBystring

The creator of the launch template.

123456789****
VersionDescriptionstring

The description of the launch template version.

testVersionDescription
LaunchTemplateDataobject

The configurations of the launch template.

DeploymentSetIdstring

The ID of the deployment set.

ds-bp1brhwhoqinyjd6****
VpcIdstring

The ID of the virtual private cloud (VPC).

v-bp67acfmxazb4p****
SystemDisk.PerformanceLevelstring

The performance level of the enhanced SSD (ESSD) to use as the system disk. Default value: PL0. Valid values:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.

For more information about ESSD performance levels, see ESSDs .

PL0
KeyPairNamestring

The name of the key pair.

testKeyPairName
SecurityGroupIdstring

The ID of the security group to which to assign the instance.

Note The SecurityGroupId and SecurityGroupIds parameters are mutually exclusive in the response.
sg-bp67acfmxazb4p****
NetworkTypestring

The network type. Valid values:

  • classic: classic network
  • vpc: VPC
vpc
SpotStrategystring

The bidding policy for the pay-as-you-go instance. Valid values:

  • NoSpot: The instance is created as a regular pay-as-you-go instance.
  • SpotWithPriceLimit: The instance is created as a preemptible instance with a user-defined maximum hourly price.
  • SpotAsPriceGo: The instance is created as a preemptible instance for which the market price at the time of purchase is automatically used as the bid price.
NoSpot
EnableVmOsConfigboolean

Indicates whether to enable the operating system configuration of the instance.

false
Descriptionstring

The description of the instance.

testInstanceDescription
SpotDurationinteger

The protection period of the preemptible instance. Unit: hours. Valid values:

  • 1: After a preemptible instance is created, Alibaba Cloud ensures that the instance is not automatically released within 1 hour. After the 1-hour protection period ends, the system compares the bid price with the market prices and checks the resource inventory to determine whether to retain or release the instance.
  • 0: After a preemptible instance is created, Alibaba Cloud does not ensure that the instance can run for one hour. The system compares the biding price with the market prices and checks the resource inventory to determine whether to retain or release the instance.

Alibaba Cloud sent ECS system events to notify you 5 minutes before the instance is released. Preemptible instances were billed by second. We recommend that you specify an appropriate protection period based on your business requirements.

Note This parameter was returned when the SpotStrategy parameter was set to SpotWithPriceLimit or SpotAsPriceGo.
1
InstanceNamestring

The name of the instance.

testInstanceName
SecurityEnhancementStrategystring

Indicates whether to enable security hardening.

active
UserDatastring

The user data of the instance, which is Base64-encoded.

SGVsbG9FQ1M=
SystemDisk.DiskNamestring

The name of the system disk.

testSystemDiskName
SystemDisk.Sizeinteger

The size of the system disk. Unit: GiB.

40
SpotPriceLimitfloat

The maximum hourly price of the preemptible instance.

0.98
PasswordInheritboolean

Indicates whether to use the password preset in the image.

true
PrivateIpAddressstring

The private IP address to assign to the instance.

10.1.**.**
ImageIdstring

The ID of the image.

m-bp67acfmxazb4p****
SystemDisk.DeleteWithInstanceboolean

Indicates whether to release the system disk when the instance is released. Valid values:

  • true: releases the system disk when the instance is released.
  • false: does not release the system disk when the instance is released.
true
SystemDisk.Categorystring

The category of the system disk. Valid values:

  • cloud: basic disk.
  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • cloud_essd: ESSD. You can use the SystemDisk.PerformanceLevel parameter to set the performance level of the ESSD to use as the system disk.

For non-I/O optimized instances of retired instance types, the default value is cloud. For other instances, the default value is cloud_efficiency.

cloud_ssd
AutoReleaseTimestring

The automatic release time of the instance.

2018-05-14T14:18:00Z
SystemDisk.Descriptionstring

The description of the system disk.

testSystemDiskDescription
ImageOwnerAliasstring

The source of the image. Valid values:

  • system: public images provided by Alibaba Cloud
  • self: custom images that you create
  • others: shared images from other Alibaba Cloud accounts
  • marketplace: Alibaba Cloud Marketplace images
system
HostNamestring

The hostname of the instance.

testHostName
SystemDisk.Iopsinteger

The number of IOPS on the system disk.

101800
SystemDisk.AutoSnapshotPolicyIdstring

The ID of the automatic snapshot policy.

sp-bp1j0alc2z1fhvie****
InternetMaxBandwidthOutinteger

The maximum outbound public bandwidth.

100
InternetMaxBandwidthIninteger

The maximum inbound public bandwidth.

5
InstanceTypestring

The instance type.

ecs.g5.large
Periodinteger

The subscription duration.

1
InstanceChargeTypestring

The billing method of the instance. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
Postpaid
IoOptimizedstring

Indicates whether the instance is I/O optimized.

none
RamRoleNamestring

The name of the instance RAM role.

testRamRoleName
VSwitchIdstring

The ID of the vSwitch to which to connect the instance.

vsw-bp67acfmxazb4p****
ResourceGroupIdstring

The ID of the resource group to which the launch template belongs.

rg-bp67acfmxazb4p****
InternetChargeTypestring

The billing method for network usage.

PayByTraffic
ZoneIdstring

The ID of the zone.

cn-hangzhou-g
Ipv6AddressCountinteger

The number of IPv6 addresses to assign to the instance.

1
DataDisksobject []

Details about the data disks.

PerformanceLevelstring

The performance level of ESSD to use as the data disk. This parameter is returned only when tne value of Category is cloud_essd. Valid values:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.
PL1
Descriptionstring

The description of the data disk.

testDiskDescription
SnapshotIdstring

The ID of the snapshot to use to create the data disk.

s-bp67acfmxazb4p****
Devicestring

The device name of the data disk.

Note This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility.
/dev/xvda
Sizeinteger

The size of the data disk.

2000
DiskNamestring

The name of the data disk.

testDiskName
Categorystring

The category of the data disk.

cloud_ssd
DeleteWithInstanceboolean

Indicates whether to release the data disk when the instance is released.

true
Encryptedstring

Indicates whether to encrypt the data disk.

false
ProvisionedIopslong

The provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}

Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}

Note This parameter is available only if the corresponding disk category parameter is set to cloud_auto. For more information, see ESSD AutoPL disks and Modify the performance configurations of an ESSD AutoPL disk.
50000
BurstingEnabledboolean

Indicates whether to enable the performance burst feature. Valid values:

  • true: enables the performance burst feature.
  • false: does not enable the performance burst feature.
true
AutoSnapshotPolicyIdstring

The ID of the automatic snapshot policy.

sp-wz91dz3ghear2a5s****
NetworkInterfacesobject []

Details about the secondary elastic network interfaces (ENIs).

NetworkInterfaceNamestring

The name of the secondary ENI.

testNetworkInterfaceName
VSwitchIdstring

The ID of the vSwitch to which to connect the secondary ENI.

vsw-bp67acfmxazb4p****
Descriptionstring

The description of the secondary ENI.

testNetworkInterfacesDescription
PrimaryIpAddressstring

The primary private IP address of the secondary ENI.

203.0.*.*
SecurityGroupIdstring

The ID of the security group to which to assign the ENI. The security group and the ENI must belong to the same VPC.

Note You must specify SecurityGroupId or SecurityGroupIds.N but not both.
sg-bp67acfmxazb4p****
SecurityGroupIdsarray

The ID of security group N with which you want to associate the ECS instance. Valid values of N vary based on the maximum number of security groups with which the instance can be associated. For more information, see the "Security group limits" section in the Limits topic.

Note You cannot specify the SecurityGroupId and SecurityGroupIds.N parameters at the same time.
string

The IDs of the security groups to which to assign the instance. The valid values of N are based on the maximum number of security groups to which the instance can belong. For more information, see the "Security group limits" section in Limits .

Note You cannot specify both the SecurityGroupId and SecurityGroupIds.N parameters.
["sg-bp15ed6xe1yxeycg7****"]
InstanceTypestring

The instance type.

ecs.s2.xlarge
NetworkInterfaceTrafficModestring

The communication mode of the ENI. Valid values:

  • Standard: The TCP communication mode is used.
  • HighPerformance: Elastic RDMA Interface (ERI) is enabled and the remote direct memory access (RDMA) communication mode is used.
Note This parameter can have a value of HighPerformance only when the ENI is attached to a c7re RDMA-enhanced instance that resides in Beijing Zone K.
Standard
Tagsobject []

The tags to add to the instance.

Keystring

The key of the tag to add to the instance.

TestKey
Valuestring

The value of the tag to add to the instance.

TestValue
SecurityGroupIdsarray

The IDs of the security groups to which to assign the instance. The valid values of N are based on the maximum number of security groups to which the instance can belong. For more information, see the "Security group limits" section in Limits .

Note You cannot specify both the SecurityGroupId and SecurityGroupIds.N parameters.
string

The IDs of the security groups to which to assign the instance. The valid values of N are based on the maximum number of security groups to which the instance can belong. For more information, see the "Security group limits" section in Limits .

Note You cannot specify both the SecurityGroupId and SecurityGroupIds.N parameters.
["sg-bp15ed6xe1yxeycg7****"]
SystemDisk.ProvisionedIopslong

The IDs of the security groups to which to assign the instance.

Note The SecurityGroupId and SecurityGroupIds parameters are mutually exclusive in the response.

50000
SystemDisk.BurstingEnabledboolean

Indicates whether to enable the performance burst feature. Valid values:

  • true: enables the performance burst feature.
  • false: does not enable the performance burst feature.
true
SystemDisk.Encryptedstring

Specifies whether to encrypt the disk. Valid values:

  • true: encrypts the disk.
  • false: does not encrypt the disk.

Default value: false

false
DeletionProtectionboolean

Specifies whether to enable release protection for the instance. This parameter determines whether you can use the ECS console or call the DeleteInstance operation to release the instance. Valid values:

  • true
  • false

Default value: false.

Note This parameter is applicable only to pay-as-you-go instances. It can protect instances against manual releases, but not against automatic releases.
false
CreditSpecificationstring

The performance mode of the burstable instance. Valid values:

  • Standard: standard mode. For more information, see the "Standard mode" section in Overview .
  • Unlimited: unlimited mode. For more information, see the "Unlimited mode" section in Overview .
Standard

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "3989ED0C-20A1-4351-A127-2067FF8390AX",
  "PageNumber": 1,
  "TotalCount": 1,
  "LaunchTemplateVersionSets": {
    "LaunchTemplateVersionSet": [
      {
        "LaunchTemplateName": "testLaunchTemplateName",
        "DefaultVersion": true,
        "VersionNumber": 1,
        "ModifiedTime": "2022-01-17T08:40:00Z",
        "LaunchTemplateId": "lt-bp67acfmxazb4p****",
        "CreateTime": "2022-01-17T08:22:43Z",
        "CreatedBy": "123456789****",
        "VersionDescription": "testVersionDescription",
        "LaunchTemplateData": {
          "DeploymentSetId": "ds-bp1brhwhoqinyjd6****",
          "VpcId": "v-bp67acfmxazb4p****",
          "SystemDisk.PerformanceLevel": "PL0",
          "KeyPairName": "testKeyPairName",
          "SecurityGroupId": "sg-bp67acfmxazb4p****",
          "NetworkType": "vpc",
          "SpotStrategy": "NoSpot",
          "EnableVmOsConfig": false,
          "Description": "testInstanceDescription",
          "SpotDuration": 1,
          "InstanceName": "testInstanceName",
          "SecurityEnhancementStrategy": "active",
          "UserData": "SGVsbG9FQ1M=",
          "SystemDisk.DiskName": "testSystemDiskName",
          "SystemDisk.Size": 40,
          "SpotPriceLimit": 0.98,
          "PasswordInherit": true,
          "PrivateIpAddress": "10.1.**.**",
          "ImageId": "m-bp67acfmxazb4p****",
          "SystemDisk.DeleteWithInstance": true,
          "SystemDisk.Category": "cloud_ssd",
          "AutoReleaseTime": "2018-05-14T14:18:00Z",
          "SystemDisk.Description": "testSystemDiskDescription",
          "ImageOwnerAlias": "system",
          "HostName": "testHostName",
          "SystemDisk.Iops": 101800,
          "SystemDisk.AutoSnapshotPolicyId": "sp-bp1j0alc2z1fhvie****",
          "InternetMaxBandwidthOut": 100,
          "InternetMaxBandwidthIn": 5,
          "InstanceType": "ecs.g5.large",
          "Period": 1,
          "InstanceChargeType": "Postpaid",
          "IoOptimized": "none",
          "RamRoleName": "testRamRoleName",
          "VSwitchId": "vsw-bp67acfmxazb4p****",
          "ResourceGroupId": "rg-bp67acfmxazb4p****",
          "InternetChargeType": "PayByTraffic",
          "ZoneId": "cn-hangzhou-g",
          "Ipv6AddressCount": 1,
          "DataDisks": {
            "DataDisk": [
              {
                "PerformanceLevel": "PL1",
                "Description": "testDiskDescription",
                "SnapshotId": "s-bp67acfmxazb4p****",
                "Device": "/dev/xvda",
                "Size": 2000,
                "DiskName": "testDiskName",
                "Category": "cloud_ssd",
                "DeleteWithInstance": true,
                "Encrypted": "false",
                "ProvisionedIops": 50000,
                "BurstingEnabled": true,
                "AutoSnapshotPolicyId": "sp-wz91dz3ghear2a5s****"
              }
            ]
          },
          "NetworkInterfaces": {
            "NetworkInterface": [
              {
                "NetworkInterfaceName": "testNetworkInterfaceName",
                "VSwitchId": "vsw-bp67acfmxazb4p****",
                "Description": "testNetworkInterfacesDescription",
                "PrimaryIpAddress": "203.0.*.*",
                "SecurityGroupId": "sg-bp67acfmxazb4p****",
                "SecurityGroupIds": {
                  "SecurityGroupId": [
                    "[\"sg-bp15ed6xe1yxeycg7****\"]"
                  ]
                },
                "InstanceType": "ecs.s2.xlarge",
                "NetworkInterfaceTrafficMode": "Standard"
              }
            ]
          },
          "Tags": {
            "InstanceTag": [
              {
                "Key": "TestKey",
                "Value": "TestValue"
              }
            ]
          },
          "SecurityGroupIds": {
            "SecurityGroupId": [
              "[\"sg-bp15ed6xe1yxeycg7****\"]"
            ]
          },
          "SystemDisk.ProvisionedIops": 50000,
          "SystemDisk.BurstingEnabled": true,
          "SystemDisk.Encrypted": "false",
          "DeletionProtection": false,
          "CreditSpecification": "Standard"
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidRegion.NotExist%sThe specified region does not exist.
400MissingParameter%sA parameter is not specified.
400InvalidParameter%sThe specified parameter is invalid.
403InnerServiceFailed%sAn internal service cannot be called.
404InvalidLaunchTemplate.NotFoundThe specified LaunchTemplate is not found.The specified launch template does not exist.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error has occurred. Try again later.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-18The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.
2023-08-01The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.
2023-03-28The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
2022-07-11API Description Update. The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.
2021-12-20The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.