Queries information about ECS instance launch template versions, such as the total number of instance launch templates, template names, and template version numbers.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeLaunchTemplateVersions |
list |
LaunchTemplate
LaunchTemplate
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the launch template. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| LaunchTemplateVersion |
array |
No |
One or more launch template version numbers. |
1 |
|
integer |
No |
One or more launch template version numbers. |
1 |
|
| LaunchTemplateId |
string |
No |
The launch template ID. You must specify LaunchTemplateId or LaunchTemplateName to determine the template. |
lt-bp168lnahrdwl39p**** |
| LaunchTemplateName |
string |
No |
The launch template name. You must specify LaunchTemplateId or LaunchTemplateName to determine the template. |
testLaunchTemplateName |
| MinVersion |
integer |
No |
The minimum version number used to filter query results. Used together with MaxVersion to query version information within the range between the minimum and maximum version numbers. |
1 |
| MaxVersion |
integer |
No |
The maximum version number used to filter query results. Used together with MinVersion to query version information within the range between the minimum and maximum version numbers. |
10 |
| DefaultVersion |
boolean |
No |
Specifies whether to query the default version. |
true |
| DetailFlag |
boolean |
No |
Specifies whether to query detailed template configuration information. Valid values:
Default value: true. |
true |
| PageNumber |
integer |
No |
The page number of the launch template list. Minimum value: 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page in a paged query. Settings the number of rows per page for paged queries. Default value: 10. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The collection of version information. |
||
| PageSize |
integer |
The number of entries per page. This value was settings for paging queries. |
10 |
| RequestId |
string |
The request ID. |
3989ED0C-20A1-4351-A127-2067FF8390AX |
| PageNumber |
integer |
The current page number. |
1 |
| TotalCount |
integer |
The total number of launch templates. |
1 |
| LaunchTemplateVersionSets |
object |
||
| LaunchTemplateVersionSet |
array<object> |
The information about the template versions. |
|
|
array<object> |
The information about the template versions. |
||
| LaunchTemplateName |
string |
The template name. |
testLaunchTemplateName |
| DefaultVersion |
boolean |
Indicates whether the template is the default version. |
true |
| VersionNumber |
integer |
The template version number. |
1 |
| ModifiedTime |
string |
The time when the template was modified. The time is displayed in ISO 8601 format in UTC. |
2022-01-17T08:40:00Z |
| LaunchTemplateId |
string |
The template ID. |
lt-bp67acfmxazb4p**** |
| CreateTime |
string |
The time when the template was created. The time is displayed in ISO 8601 format in UTC. |
2022-01-17T08:22:43Z |
| CreatedBy |
string |
The creator of the template, which is the Alibaba Cloud account ID. |
123456789**** |
| VersionDescription |
string |
The description of the template version. |
testVersionDescription |
| LaunchTemplateData |
object |
The specific configurations of the template. |
|
| DeploymentSetId |
string |
The ID of the deployment set. |
ds-bp1brhwhoqinyjd6**** |
| VpcId |
string |
The VPC ID. |
v-bp67acfmxazb4p**** |
| SystemDisk.PerformanceLevel |
string |
The performance level (PL) settings for the enterprise SSD (ESSD) used as the system disk. Valid values:
For more information about how to select an ESSD performance level, see ESSD. |
PL0 |
| KeyPairName |
string |
The name of the key pair. |
testKeyPairName |
| SecurityGroupId |
string |
The security group ID of the instance. Note
|
sg-bp67acfmxazb4p**** |
| NetworkType |
string |
The network type. Valid values:
|
vpc |
| SpotStrategy |
string |
The bidding policy for pay-as-you-go instances. Valid values:
|
NoSpot |
| EnableVmOsConfig |
boolean |
Indicates whether the operating system configuration of the instance is enabled. |
false |
| Description |
string |
The description of the instance. |
testInstanceDescription |
| SpotDuration |
integer |
The protection period of the spot instance. Unit: hours. Valid values:
Alibaba Cloud sends an ECS system event notification 5 minutes before the instance is released. Spot instances are billed by second. Select an appropriate protection period based on the expected task execution duration. Note
This parameter is returned only when SpotStrategy is set to SpotWithPriceLimit or SpotAsPriceGo. |
1 |
| InstanceName |
string |
Instance name |
testInstanceName |
| SecurityEnhancementStrategy |
string |
Specifies whether security hardening is enabled. |
active |
| UserData |
string |
The instance user data, which is Base64-encoded. |
SGVsbG9FQ1M= |
| SystemDisk.DiskName |
string |
The name of the system disk. |
testSystemDiskName |
| SystemDisk.Size |
integer |
The size of the system disk. Unit: GiB. |
40 |
| SpotPriceLimit |
number |
The maximum hourly price of the instance. |
0.98 |
| PasswordInherit |
boolean |
Indicates whether the username and password pair preset in the image is inherited. |
true |
| PrivateIpAddress |
string |
The private IP address of the instance. |
10.1.**.** |
| ImageId |
string |
The ID of the image used by the instance. |
m-bp67acfmxazb4p**** |
| SystemDisk.DeleteWithInstance |
boolean |
Indicates whether the system disk is released when the instance is released. Valid values:
|
true |
| SystemDisk.Category |
string |
The category of the system disk. Valid values:
For retired instance types that are not I/O optimization instances, the default value is cloud. For other instance types, the default value is cloud_efficiency. |
cloud_ssd |
| AutoReleaseTime |
string |
The automatic release time. The time is displayed in ISO 8601 format in UTC. |
2018-05-14T14:18:00Z |
| SystemDisk.Description |
string |
The description of the system disk. |
testSystemDiskDescription |
| ImageOwnerAlias |
string |
The source of the image. Valid values:
|
system |
| HostName |
string |
The hostname of the instance. |
testHostName |
| SystemDisk.Iops |
integer |
The total IOPS of the system disk. |
101800 |
| SystemDisk.AutoSnapshotPolicyId |
string |
The ID of the automatic snapshot policy. |
sp-bp1j0alc2z1fhvie**** |
| InternetMaxBandwidthOut |
integer |
The maximum outbound public bandwidth. |
100 |
| InternetMaxBandwidthIn |
integer |
The maximum inbound public bandwidth. |
5 |
| InstanceType |
string |
The instance type. |
ecs.g5.large |
| Period |
integer |
The duration of the purchased resource. |
1 |
| InstanceChargeType |
string |
The billing method of the instance. Valid values:
|
Postpaid |
| IoOptimized |
string |
Indicates whether the instance is an I/O optimization instance. |
none |
| RamRoleName |
string |
The name of the instance RAM role. |
testRamRoleName |
| VSwitchId |
string |
The ID of the vSwitch to which the instance belongs. |
vsw-bp67acfmxazb4p**** |
| ResourceGroupId |
string |
The ID of the resource group to which the launch template belongs. |
rg-bp67acfmxazb4p**** |
| InternetChargeType |
string |
The billable methods for public bandwidth. |
PayByTraffic |
| ZoneId |
string |
The zone ID. |
cn-hangzhou-g |
| Ipv6AddressCount |
integer |
The number of IPv6 addresses assigned to the instance. |
1 |
| DataDisks |
object |
||
| DataDisk |
array<object> |
The collection of data disks. |
|
|
object |
The collection of data disks. |
||
| PerformanceLevel |
string |
The performance level (PL) settings for the enterprise SSD used as a data disk. This parameter is returned only when
|
PL1 |
| Description |
string |
The description of the data disk. |
testDiskDescription |
| SnapshotId |
string |
The snapshot ID used by the data disk. |
s-bp67acfmxazb4p**** |
| Device |
string |
The mount point of the data disk. The naming convention varies based on the number of attached data disks:
Note
This parameter is used only for full images (whole-machine images). You can set this parameter to the mount point of the data disk in the full image and modify the corresponding |
/dev/xvdb |
| Size |
integer |
The size of the data disk. |
2000 |
| DiskName |
string |
The name of the data disk. |
testDiskName |
| Category |
string |
The category of data disk N. Valid values:
For I/O optimized instances, the default value is cloud_efficiency. For non-I/O optimized instances, the default value is cloud. Default value description:
|
cloud_ssd |
| DeleteWithInstance |
boolean |
Indicates whether the data disk is released when the instance is released. |
true |
| Encrypted |
string |
Indicates whether the data disk is encrypted. |
false |
| ProvisionedIops |
integer |
Specifies whether to modify the provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50000, 1000 × Capacity - Baseline performance}. Baseline performance = min{1,800 + 50 × Capacity, 50,000} Note
This parameter is supported only when DiskCategory is set to cloud_auto. For more information, see ESSD AutoPL disk and Modify the provisioned performance of an ESSD AutoPL disk. |
50000 |
| BurstingEnabled |
boolean |
Indicates whether the performance burst feature is enabled. Valid values:
|
true |
| AutoSnapshotPolicyId |
string |
The ID of the automatic snapshot policy. |
sp-wz91dz3ghear2a5s**** |
| KMSKeyId |
string |
The Key Management Service (KMS) key ID of the data disk. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| NetworkInterfaces |
object |
||
| NetworkInterface |
array<object> |
The collection of property settings for secondary network interface controllers (NICs). |
|
|
array<object> |
The collection of property settings for secondary network interface controllers (NICs). |
||
| NetworkInterfaceName |
string |
The name of the secondary network interface controller (NIC). |
testNetworkInterfaceName |
| VSwitchId |
string |
The ID of the vSwitch to which the network interface controller (NIC) belongs. |
vsw-bp67acfmxazb4p**** |
| Description |
string |
The description of the secondary network interface controller (NIC). |
testNetworkInterfacesDescription |
| PrimaryIpAddress |
string |
The primary private IP address of the secondary network interface controller (NIC). |
203.0.*.* |
| SecurityGroupId |
string |
The security group ID of the secondary network interface controller (NIC). The security group must belong to the same VPC. Note
SecurityGroupId and SecurityGroupIds are not returned at the same time. |
sg-bp67acfmxazb4p**** |
| SecurityGroupIds |
object |
||
| SecurityGroupId |
array |
One or more security groups to which the secondary network interface controller (NIC) belongs. Note
SecurityGroupId and SecurityGroupIds are not returned at the same time. |
|
|
string |
One or more security groups to which the secondary network interface controller (NIC) belongs. Note
SecurityGroupId and SecurityGroupIds are not returned at the same time. |
["sg-bp15ed6xe1yxeycg7****"] |
|
| InstanceType |
string |
The instance type. |
ecs.s2.xlarge |
| NetworkInterfaceTrafficMode |
string |
The communication mode of the primary ENI. Valid values:
|
Standard |
| DeleteOnRelease |
boolean |
Indicates whether the ENI is retained when the instance is released. Valid values:
|
true |
| Tags |
object |
||
| InstanceTag |
array<object> |
The tags of the instance. |
|
|
object |
The tags of the instance. |
||
| Key |
string |
The tag key of the instance. |
TestKey |
| Value |
string |
The tag value of the instance. |
TestValue |
| SecurityGroupIds |
object |
||
| SecurityGroupId |
array |
The IDs of the security groups to which the instance belongs. Note
|
|
|
string |
The IDs of the security groups to which the instance belongs. Note
|
["sg-bp15ed6xe1yxeycg7****"] |
|
| SystemDisk.ProvisionedIops |
integer |
The provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline performance}. Baseline performance = min{1,800 + 50 × Capacity, 50,000} Note
This parameter is supported only when DiskCategory is set to cloud_auto. For more information, see ESSD AutoPL disks and Modify the provisioned performance of an ESSD AutoPL disk. |
50000 |
| SystemDisk.BurstingEnabled |
boolean |
Indicates whether the performance burst feature is enabled. Valid values:
|
true |
| SystemDisk.Encrypted |
string |
Indicates whether the system disk is encrypted. Valid values:
Default value: false. Note
Hong Kong (China) Zone D and Singapore Zone A do not support system disk encryption when you create an instance. |
false |
| DeletionProtection |
boolean |
The release protection attribute of the instance. This parameter specifies whether the instance can be released from the ECS console or by calling the DeleteInstance operation. Valid values:
Default value: false. Note
This attribute applies only to pay-as-you-go instances. It can only prevent manual release, not system-initiated release. |
false |
| CreditSpecification |
string |
The performance mode of the burstable instance. Valid values:
|
Standard |
| AutoRenew |
boolean |
Indicates whether auto-renewal is enabled. This parameter takes effect only when
Default value: false. |
true |
| AutoRenewPeriod |
integer |
The auto-renewal period. Valid values: If PeriodUnit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1. |
1 |
| PeriodUnit |
string |
The unit of the subscription billable methods period. Valid values: Month (default). |
Month |
| HttpEndpoint |
string |
Indicates whether the access channel for instance metadata is enabled. Valid values:
Default value: enabled. Note
For more information about instance metadata, see Overview of instance metadata. |
enabled |
| HttpTokens |
string |
Specifies whether the hardened mode (IMDSv2) is required when you access instance metadata. Valid values:
Default value: optional. Note
For more information about the patterns for accessing instance metadata, see Overview of instance metadata. |
optional |
| HttpPutResponseHopLimit |
integer |
Note
This parameter is not available for use. |
3 |
| SystemDisk.KMSKeyId |
string |
The KMS key ID of the system disk. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| ImageOptions |
object |
The image-related property information. |
|
| LoginAsNonRoot |
boolean |
Indicates whether the instance that uses this image supports logon with the ecs-user user. Valid values:
|
false |
| SecurityOptions |
object |
The security options. |
|
| TrustedSystemMode |
string |
The trusted system mode. Set the value to vTPM. The following instance families support the trusted system mode:
When you create ECS instances of the preceding instance families, you must set this parameter. Take note of the following items:
Note
If you specify the instance as a trusted instance when you create it, you can replace the system disk only with an image that supports the trusted system. For more information about the trusted system, see Overview of trusted features for security-enhanced instances. |
vTPM |
Examples
Success response
JSON format
{
"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/xvdb\n",
"Size": 2000,
"DiskName": "testDiskName",
"Category": "cloud_ssd",
"DeleteWithInstance": true,
"Encrypted": "false",
"ProvisionedIops": 50000,
"BurstingEnabled": true,
"AutoSnapshotPolicyId": "sp-wz91dz3ghear2a5s****",
"KMSKeyId": "0e478b7a-4262-4802-b8cb-00d3fb40****"
}
]
},
"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",
"DeleteOnRelease": true
}
]
},
"Tags": {
"InstanceTag": [
{
"Key": "TestKey",
"Value": "TestValue"
}
]
},
"SecurityGroupIds": {
"SecurityGroupId": [
"[\"sg-bp15ed6xe1yxeycg7****\"]"
]
},
"SystemDisk.ProvisionedIops": 50000,
"SystemDisk.BurstingEnabled": true,
"SystemDisk.Encrypted": "false",
"DeletionProtection": false,
"CreditSpecification": "Standard",
"AutoRenew": true,
"AutoRenewPeriod": 1,
"PeriodUnit": "Month",
"HttpEndpoint": "enabled",
"HttpTokens": "optional",
"HttpPutResponseHopLimit": 3,
"SystemDisk.KMSKeyId": "0e478b7a-4262-4802-b8cb-00d3fb40****\n",
"ImageOptions": {
"LoginAsNonRoot": false
},
"SecurityOptions": {
"TrustedSystemMode": "vTPM"
}
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidRegion.NotExist | %s | The specified region does not exist. |
| 400 | MissingParameter | %s | A parameter is not specified. |
| 400 | InvalidParameter | %s | The specified parameter is invalid. |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. Try again later. |
| 403 | InnerServiceFailed | %s | An internal service cannot be called. |
| 404 | InvalidLaunchTemplate.NotFound | The specified LaunchTemplate is not found. | The specified launch template does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.