Queries the versions of a launch template.
Operation description
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the launch template. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
LaunchTemplateVersion | array | No | Version N of the launch template. | |
long | No | Version N of the launch template. | 1 | |
LaunchTemplateId | string | No | The ID of the launch template. You must set LaunchTemplateId or LaunchTemplateName to specify a launch template. | lt-bp168lnahrdwl39p**** |
LaunchTemplateName | string | No | The name of the launch template. | testLaunchTemplateName |
MinVersion | long | No | The minimum version number in the version range to query. | 1 |
MaxVersion | long | No | The maximum version number in the version range to query. | 10 |
DefaultVersion | boolean | No | Specifies whether to query the default version. | true |
DetailFlag | boolean | No | Specifies whether to query the configurations of the launch template. Valid values:
Default value: true. | true |
PageNumber | integer | No | The number of the page to return. Pages start from page 1. Default value: 1. | 1 |
PageSize | integer | No | The number of entries to return on each page. Default value: 10. | 10 |
Response parameters
Examples
Sample success responses
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/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 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. |
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. |
500 | InternalError | The 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 time | Summary of changes | Operation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-10-18 | The Error code has changed. The response structure of the API has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-08-01 | The Error code has changed. The response structure of the API has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-03-28 | The Error code has changed | see changesets | ||||||||||||
| ||||||||||||||
2022-07-11 | API Description Update. The Error code has changed. The response structure of the API has changed | see changesets | ||||||||||||
| ||||||||||||||
2021-12-20 | The Error code has changed. The response structure of the API has changed | see changesets | ||||||||||||
|