You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Launch templates
DescribeLaunchTemplateVersions - Queries instance launch template versions
Copy page
Download PDF
DescribeLaunchTemplateVersions - Queries instance launch template versions
Call the DescribeLaunchTemplateVersions operation to query instance launch template versions.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the request parameters specific to this operation and some common parameters are listed below. For more information, refer to Common parameters.​
Action string required Sample value: DescribeLaunchTemplateVersions​
The action that you want to perform. Value: DescribeLaunchTemplateVersions.​
​
Version string required Sample value: 2020-04-01​
The API version. Value: 2020-04-01.​
​
LaunchTemplateId string Optional Sample value: lt-ysxc16auaugh9zfy****​
The ID of the instance launch template.​
tip​
You are required to specify LaunchTemplateId or LaunchTemplateName to specify the template.​
​
LaunchTemplateName string Optional Sample value: test​
The name of the instance launch template.​
tip​
You are required to specify LaunchTemplateId or LaunchTemplateName to specify the template.​
​
DefaultVersion boolean Optional Sample value: true​
Indicates whether to query the default version. Valid values:​
  • true (default): Queries the default version.​
  • false: Does not query the default version.​
​
NextToken string Optional Sample value: --​
Pagination token marking the query position. Omit this parameter for initial API requests. In the next query, set the NextToken parameter to the value returned by the previous API call.​
​
MaxResults integer Optional Sample value: 10​
The number of entries per page.​
  • Maximum value: 100​
  • Default value: 10​
​
LaunchTemplateVersions.N integer[] Optional Sample value: 1​
The version of the instance launch template. Up to 30 versions are supported.​
  • Argument - N: specifies the serial number of the instance launch template.​
  • Separate multiple versions with &.​
​
​
​
Response parameters​
Only the response parameters specific to this operation are listed below. For more information, refer to the response structure.​
NextToken string Sample value: --​
The pagination token returned by this call. If this value is empty, the current page is the last page.​
​
​
LaunchTemplateVersions object[] Sample value:​
The information of the instance launch template that meets the condition.​
LaunchTemplateId string Sample value: lt-ysxc16auaugh9zfy****​
The ID of the instance launch template.​
​
VersionDescription string Sample value: test​
The template version description.​
​
LaunchTemplateVersionData object Sample value: --​
The template configuration information.​
InstanceTypeId string Sample value: ecs.g1.large​
The instance type.​
​
KeyPairName string Sample value: kp-test-123​
The key pair associated with the instance.​
​
UserData string Sample value: ZWNobyBoZWxsbyBlY3Mh​
The custom data of the instance.​
​
InstanceName string Sample value: instance-test​
The instance name.​
​
Description string Sample value: ECS​
Instance description.​
​
HostName string Sample value: instance-host-name​
Instance hostname.​
​
ZoneId string Sample value: cn-beijing-a​
The ID of the availability zone where the instance is located.​
​
VpcId string Sample value: vpc-3thbinq64t4bwbha****​
VPC ID.​
​
HpcClusterId string Sample value: hpcCluster-l8u24ovdmoab6opf****​
The HPC cluster ID.​
​
InstanceChargeType string Sample value: PostPaid​
The billing method of the instance and volume. Value:​
  • PostPaid: Pay-as-you-go.​
  • PrePaid: Subscription.​
​
SuffixIndex integer Sample value: 1​
The starting number of sequential suffixes.​
​
UniqueSuffix boolean Sample value: false​
Whether to enable the sequential suffix feature. Valid values:​
  • true: Enables the sequential suffix feature.​
  • false: Disables the sequential suffix feature.​
​
ProjectName string Sample value: default​
The project to which the instance belongs.​
​
SpotStrategy string Sample value: NoSpot​
The spot strategy for the pay-as-you-go instance. Value:​
  • NoSpot: Instances are billed in pay-as-you-go mode.​
  • SpotAsPriceGo: The system automatically bids based on the current market price for the spot instance.​
  • SpotWithPriceLimit: spot instance with a price limit.​
​
SpotPriceLimit float Sample value: 0.78​
The maximum hourly price of the spot instance.​
​
ImageId string Sample value: image-ybmhzqo8u4l8j1ii****​
The image ID.​
​
SecurityEnhancementStrategy string Sample value: Active​
Whether to enable security enhancement. Value:​
  • Active: Enables security enhancement. This feature is effective for public images only.​
  • InActive: Disables security enhancement. This feature is effective for all images.​
​
Volumes object[]​
The information about the volume associated with the instance.​
VolumeType string Sample value: ESSD_PL0​
The volume type. Value:​
  • ESSD_PL0: ESSD PL0.​
  • PTSSD: PTSSD.​
​
Size integer Sample value: 100​
The volume capacity. Unit: GiB.​
​
DeleteWithInstance boolean Sample value: false​
Whether to release the volume with the instance. Value:​
  • true: The volume is released with the instance.​
  • false: The volume is not released with the instance.​
​
ExtraPerformanceTypeId string Sample value: Balance​
The type of additional performance for the volume. This feature is only supported by ESSD FlexPL data volumes. For more information about additional performance, please refer to Volume additional performance. Valid range:​
  • Balance: Balanced additional performance.​
  • IOPS: IOPS additional performance.​
  • Throughput: Additional performance related to throughput.​
tip​
  • Argument - N: indicates the serial number of the volume. Valid range: 1–16. N = 1 indicates the system volume. When N is passed in as 1, this parameter is ignored. N ≥ 2 indicates the data volume, and this parameter can be normally passed in.​
  • Separate multiple volumes with ampersands (&).​
​
ExtraPerformanceIOPS integer Sample value: 1​
The capacity of additional IOPS performance (unit:ops/sec, operations per second) for the volume. Only ESSD FlexPL data volumes support additional IOPS performance. When ExtraPerformanceTypeId is set to Balance or IOPS, configure this parameter. The value ranges for each type of extra performance are as follows:​
  • IOPS: 1–50000​
  • Balance: 1–50000​
tip​
  • Argument - N: indicates the serial number of the volume. Valid value: 1–16. N = 1 indicates the system volume. When N is passed in as 1, this parameter is ignored. N ≥ 2 indicates the data volume, and this parameter can be normally passed in.​
  • Separate multiple volumes with ampersands (&).​
​
ExtraPerformanceThroughputMB integer Sample value: 1​
The capacity of additional throughput performance (unit: MB/s) for the volume. Only ESSD FlexPL data volumes support additional throughput performance. When ExtraPerformanceTypeId is Throughput, configure this parameter. Value range: 1–650.​
tip​
  • Argument - N: indicates the serial number of the volume. Valid range: 1–16. N = 1 indicates the system volume. When N is passed in as 1, this parameter is ignored. N ≥ 2 indicates the data volume, and this parameter can be normally passed in.​
  • Separate multiple volumes with ampersands (&).​
​
SnapshotId string Sample value: snap-31ak39j5bh8rubsn****​
Only data volumes can be created with a snapshot. You can call the DescribeSnapshots operation to query the snapshot ID.​
  • Argument - N: indicates the serial number of the volume. Valid range: 1–16. N = 1 indicates the system volume. When N is passed in as 1, this parameter is ignored. N ≥ 2 indicates the data volume. Therefore, you can pass in the snapshot ID for the target data volume.​
  • Multiple volumes are separated with &.​
tip​
  • Only ESSD supports volume creation using snapshots. PTSSD does not support snapshot-related features.​
  • Only snapshots in "Available" status support new volume creation. Snapshots in statuses "Creating", "Rolling Back", "Deleting", and "Error" do not support new volume creation.​
​
​
NetworkInterfaces object[]​
Information about the network interface mounted to the instance.​
SubnetId string Sample value: subnet-3tispp1nai4e8i****​
Subnet ID.​
​
SecurityGroupIds string[] Sample value: [sg-3ti78x9h8t4bw*****,sg-3cj59ih2v9hj46c6rr******]​
The security group ID.​
​
​
Eip object​
The information about the EIP associated with the instance.​
Bandwidth integer Sample value: 1​
The maximum bandwidth for the EIP. Unit: Mbps.​
  • Value range: 1 to 200.​
  • Default value: 1​
​
ISP string Sample value: BGP​
The EIP ISP type. Valid values:​
  • BGP: BGP (Multi-ISP).​
  • ChinaMobile: China Mobile static single-ISP.​
  • ChinaTelecom: China Telecom static single-ISP.​
  • ChinaUnicom: China Unicom static single-ISP.​
​
SecurityProtectionTypes string[] Sample value: [AntiDDoS_Enhanced]​
The security protection type of EIP. Value:​
  • AntiDDoS_Enhanced: Apply for EIP with enhanced protection type. Then the instance can be secured with Anti-DDoS Origin (Enterprise Edition).​
​
BandwidthPackageId string Sample value: bwp-2zeo05qre24nhrqpy****​
The ID of the shared bandwidth package.​
​
SecurityProtectionInstanceId integer Sample value: 151​
The ID of the security package.​
​
BillingType integer Sample value: 2​
The metering method of Elastic IP address (EIP). Valid values:​
  • 2: Pay-as-you-go (pay-by-bandwidth).​
  • 3: Pay-as-you-go (pay-by-data-transfer).​
​
ReleaseWithInstance boolean Sample value: false​
Whether the EIP is deleted along with the instance. This feature is only available for pay-as-you-go EIPs. Value:​
  • true: The EIP is deleted along with the instance. When an instance is automatically reclaimed by the system (for example, 24 hours after unsubscription or upon expiration) or deleted via the DeleteInstance or DeleteInstances API, the EIP is released along with the instance.​
  • false (default): The EIP is not deleted when the instance is deleted.​
​
​
Tags object[]​
The tag information of the instance.​
Key string Sample value: keydemo​
Tag key of the instance.​
​
Value string Sample value: valuedemo​
The tag value of the instance.​
​
​
ScheduledInstance object​
The information of the ESI order.​
ScheduledInstanceName string Sample value: ESI-Name​
The name of the ESI order.​
​
ScheduledInstanceDescription string Sample value: this is a test order​
The description of the ESI order.​
​
​
DeploymentSetId string Sample value: dps-yc1o9aahks5m57nk****​
The ID of the deployment set that the instance is added to.​
​
DeploymentSetGroupNumber integer Sample value: 1​
When an ECS instance is to join or adjust to a deployment set with the AvailabilityGroup policy, this parameter can be used to specify the group number of the instance within the deployment set.​
​
KeepImageCredential boolean Sample value: false​
Whether to keep image settings. Value:​
  • true: Keep image settings. This allows you to use the password or key pair specified for the image to log in to the ECS instance.​
  • false (default): Does not keep image settings.​
tip​
  • Only custom images and shared images support this feature.​
  • When the value of this parameter is true, do not pass in KeyPairName.​
​
​
CreatedAt string Sample value: 2022-04-10T18:29:38+08:00​
The creation time of the instance launch template.​
​
UpdatedAt string Sample value: 2022-04-14T18:29:38+08:00​
The update time of the instance launch template.​
​
VersionNumber integer Sample value: 1​
The template version number.​
​
​
​
​
Sample request​
​
GET /?Action=DescribeLaunchTemplateVersions&Version=2020-04-01&LaunchTemplateId=lt-ysxc16auaugh9zfy**** HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
ServiceName: ecs​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "202401301658273AB316284D07320****",​
"Action": "DescribeLaunchTemplateVersions",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {​
"NextToken": "",​
"LaunchTemplateVersions": [​
{​
"LaunchTemplateId": "lt-ysxc16auaugh9zfy****",​
"VersionNumber": 1,​
"VersionDescription": "",​
"LaunchTemplateVersionData": {​
"ZoneId": "",​
"InstanceTypeId": "ecs.t2-c1m1.large",​
"ImageId": "image-yco8plt02em0t*******",​
"InstanceChargeType": "",​
"InstanceName": "for-test",​
"Description": "",​
"HostName": "test",​
"UniqueSuffix": true,​
"SuffixIndex": 1,​
"KeyPairName": "******",​
"SecurityEnhancementStrategy": "InActive",​
"UserData": "ZWNobyBoZWxsbyxxxxxxx",​
"HpcClusterId": "",​
"Volumes": [​
{​
"VolumeType": "ESSD_PL0",​
"Size": 40,​
"DeleteWithInstance": false​
},​
{​
"VolumeType": "ESSD_PL0",​
"Size": 40,​
"DeleteWithInstance": false​
}​
],​
"NetworkInterfaces": [​
{​
"SubnetId": "subnet-imc2pmpasbuo8gbssz******",​
"SecurityGroupIds": [​
"sg-2ff4fhdtlo8ao59gp67******"​
]​
}​
],​
"Eip": {​
"Bandwidth": 1,​
"ISP": "BGP",​
"BillingType": 3,​
"BandwidthPackageId": "",​
"SecurityProtectionTypes": [],​
"SecurityProtectionInstanceId": 0​
},​
"VpcId": "",​
"ProjectName": "",​
"Tags": [],​
"SpotStrategy": "",​
"SpotPriceLimit": 0,​
"ScheduledInstance": {​
"ScheduledInstanceName": "",​
"ScheduledInstanceDescription": ""​
}​
},​
"CreatedAt": "2024-03-22T14:24:48+08:00",​
"UpdatedAt": "2024-03-22T14:24:48+08:00"​
}​
]​
}​
}​
​
Error codes​
To learn more about error codes, see Common error codes.​
Last updated: 2026.06.18 17:48:25