Calls the DescribeLaunchTemplates operation. You can specify parameters such as TemplateTag, TemplateResourceGroupId, and LaunchTemplateId to query information about one or more launch templates, including the total number of launch templates, template creation time, and latest version number.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeLaunchTemplates |
get |
LaunchTemplate
LaunchTemplate
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| TemplateTag |
array<object> |
No |
The list of tag key-value pairs of the launch template. Note
Currently, you can create and query launch template tags only by calling API operations. The console does not support creating or viewing launch template tags. |
|
|
object |
No |
The tag key-value pair information of the launch template. |
||
| Key |
string |
No |
The tag key of the launch template. Valid values of N: 1 to 20. If you use a single tag to filter resources, the number of resources with the specified tag cannot exceed 1000. If you use multiple tags to filter resources, the number of resources that are bound with all the specified tags cannot exceed 1000. If the number of resources exceeds 1000, call the ListTagResources operation to query them. |
TestKey |
| Value |
string |
No |
The tag value of the launch template. Valid values of N: 1 to 20. |
TestValue |
| 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 for a paginated query. Default value: 10. |
10 |
| TemplateResourceGroupId |
string |
No |
The ID of the resource group to which the launch template belongs. When you use this parameter to filter resources, the number of resources cannot exceed 1000. Note
Filtering by the default resource group is not supported. |
rg-acfmxazb4p**** |
| LaunchTemplateId |
array |
No |
An array of one or more launch template IDs.
|
lt-m5e3ofjr1zn1aw7q**** |
|
string |
No |
The launch template ID.
|
lt-m5e3ofjr1zn1aw7q**** |
|
| LaunchTemplateName |
array |
No |
An array of one or more launch template names.
|
wd-152630748**** |
|
string |
No |
The name of the launch template.
|
wd-152630748**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageSize |
integer |
The number of entries per page. |
10 |
| RequestId |
string |
The request ID. |
04F0F334-1335-436C-A1D7-6C044FE12CBA |
| PageNumber |
integer |
The current page number. |
1 |
| TotalCount |
integer |
The total number of launch templates. |
1 |
| LaunchTemplateSets |
object |
||
| LaunchTemplateSet |
array<object> |
The list of launch template information. |
|
|
array<object> |
The launch template information. |
||
| LaunchTemplateName |
string |
The name of the launch template. |
wd-152630748**** |
| DefaultVersionNumber |
integer |
The default version number of the launch template. |
1 |
| ModifiedTime |
string |
The time when a version was added to or deleted from the launch template. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2018-05-14T14:18:00Z |
| LaunchTemplateId |
string |
The ID of the launch template. |
lt-m5e3ofjr1zn1aw7q**** |
| CreateTime |
string |
The time when the launch template was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2018-05-14T14:18:00Z |
| ResourceGroupId |
string |
The ID of the resource group to which the launch template belongs. |
rg-acfmxazb4p**** |
| CreatedBy |
string |
The ID of the Alibaba Cloud account that created the launch template. |
20169351435666**** |
| LatestVersionNumber |
integer |
The latest version number of the launch template. |
1 |
| Tags |
object |
||
| Tag |
array<object> |
The tags of the launch template. Note
You can only call API operations to add tags to and query the tags of a launch template. You cannot add tags to or view the tags of a launch template in the ECS console. |
|
|
object |
The tag of the launch template. |
||
| TagValue |
string |
The tag key of the launch template. |
TestValue |
| TagKey |
string |
The tag value of the launch template. |
TestKey |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE12CBA",
"PageNumber": 1,
"TotalCount": 1,
"LaunchTemplateSets": {
"LaunchTemplateSet": [
{
"LaunchTemplateName": "wd-152630748****",
"DefaultVersionNumber": 1,
"ModifiedTime": "2018-05-14T14:18:00Z",
"LaunchTemplateId": "lt-m5e3ofjr1zn1aw7q****",
"CreateTime": "2018-05-14T14:18:00Z",
"ResourceGroupId": "rg-acfmxazb4p****",
"CreatedBy": "20169351435666****",
"LatestVersionNumber": 1,
"Tags": {
"Tag": [
{
"TagValue": "TestValue",
"TagKey": "TestKey"
}
]
}
}
]
}
}
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. |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.