Queries one or more available launch templates.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeLaunchTemplates |
The operation that you want to perform. Set the value to DescribeLaunchTemplates. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the launch template. You can call the DescribeRegions operation to query the most recent region list. |
TemplateTag.N.Key | String | No | TestKey |
The key of tag N of the launch template. Valid values of N: 1 to 20. If a single tag is specified to query resources, up to 1,000 resources that have this tag added can be displayed in the response. If multiple tags are specified to query resources, up to 1,000 resources that have all these tags added can be displayed in the response. To query more than 1,000 resources that have specified tags added, call the ListTagResources operation. |
TemplateTag.N.Value | String | No | TestValue |
The value of tag N of the launch template. Valid values of N: 1 to 20. |
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Default value: 10. |
TemplateResourceGroupId | String | No | rg-acfmxazb4p**** |
The ID of the resource group to which the launch template belongs. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response. Note Resources in the default resource group are displayed in the response regardless of
how this parameter is set.
|
LaunchTemplateId.N | String | No | lt-m5e3ofjr1zn1aw7q**** |
The IDs of one or more launch templates. You can specify up to 100 launch template IDs. You must set LaunchTemplateId.N or LaunchTemplateName.N to specify launch templates. |
LaunchTemplateName.N | String | No | wd-152630748**** |
The names of one or more launch templates. You can specify up to 100 launch template names. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | 04F0F334-1335-436C-A1D7-6C044FE12CBA |
The ID of the request. |
PageNumber | Integer | 1 |
The page number of the returned page. |
TotalCount | Integer | 1 |
The total number of launch templates. |
LaunchTemplateSets | Array of LaunchTemplateSet |
Details about the launch templates. |
|
LaunchTemplateSet | |||
LaunchTemplateName | String | wd-152630748**** |
The name of the launch template. |
DefaultVersionNumber | Long | 1 |
The default version number of the launch template. |
ModifiedTime | String | 2018-05-14T14:18:00Z |
The time when the launch template was modified. |
LaunchTemplateId | String | lt-m5e3ofjr1zn1aw7q**** |
The ID of the launch template. |
CreateTime | String | 2018-05-14T14:18:00Z |
The time when the launch template was created. |
ResourceGroupId | String | rg-acfmxazb4p**** |
The ID of the resource group to which the launch template belongs. |
CreatedBy | String | 1234567890 |
The creator of the launch template. |
LatestVersionNumber | Long | 1 |
The latest version number of the launch template. |
Tags | Array of Tag |
The tags of the launch template. |
|
Tag | |||
TagValue | String | TestValue |
The tag value of the launch template. |
TagKey | String | TestKey |
The tag key of the launch template. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=DescribeLaunchTemplates
&RegionId=cn-hangzhou
&TemplateTag.1.Key=TestKey
&TemplateTag.1.Value=TestValue
&LaunchTemplateId.1=lt-m5e3ofjr1zn1aw7q****
&LaunchTemplateName.1=wd-152630748****
&PageNumber=1
&PageSize=10
&TemplateResourceGroupId=rg-acfmxazb4p****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeLaunchTemplatesResponse>
<RequestId>04F0F334-1335-436C-A1D7-6C044FE12CBA</RequestId>
<TotalCount>1</TotalCount>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<LaunchTemplateSets>
<LaunchTemplateSet>
<CreateTime>2018-05-14T14:18:00Z</CreateTime>
<ModifiedTime>2018-05-14T14:18:00Z</ModifiedTime>
<LaunchTemplateid>lt-m5e3ofjr1zn1aw7****</LaunchTemplateid>
<LaunchTemplateName>wd-152630748****</LaunchTemplateName>
<DefaultVersionNumber>1</DefaultVersionNumber>
<LatestVersionNumber>1</LatestVersionNumber>
<CreatedBy>194211134971****</CreatedBy>
</LaunchTemplateSet>
</LaunchTemplateSets>
</DescribeLaunchTemplatesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "04F0F334-1335-436C-A1D7-6C044FE12CBA",
"TotalCount" : 1,
"PageNumber" : 1,
"PageSize" : 10,
"LaunchTemplateSets" : {
"LaunchTemplateSet" : [ {
"LaunchTemplateName" : "wd-152630748****",
"CreatedBy" : "194211134971****",
"ModifiedTime" : "2018-05-14T14:18:00Z",
"LatestVersionNumber" : 1,
"CreateTime" : "2018-05-14T14:18:00Z",
"LaunchTemplateId" : "lt-m5e3ofjr1zn1aw7q****",
"DefaultVersionNumber" : 1
} ]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidRegion.NotExist | %s | The error message returned because the specified RegionId parameter does not exist. |
400 | MissingParameter | %s | The error message returned because a required parameter is not specified. |
400 | InvalidParameter | %s | The error message returned because a specified parameter is invalid. |
403 | InnerServiceFailed | %s | The error message returned because an internal service cannot be called. |
For a list of error codes, visit the Error Center.