You can call this operation to query 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 are bound with this tag can be displayed in the response. If multiple tags are specified to query resources, up to 1,000 resources that are bound with all these tags can be displayed in the response. To query more than 1,000 resources that are bound with specified tags, 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. |
LaunchTemplateId.N | RepeatList | No | lt-m5e3ofjr1zn1aw7q**** |
The IDs of one or more launch templates. You can specify a maximum of 100 launch template IDs. You must specify the LaunchTemplateId parameter or the LaunchTemplateName parameter to determine a launch template. |
LaunchTemplateName.N | RepeatList | No | wd-152630748**** |
The names of one or more launch templates. You can specify a maximum of 100 launch template names. |
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default: 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. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
LaunchTemplateSets | Array of LaunchTemplateSet |
Details about the launch templates. |
|
LaunchTemplateSet | |||
CreateTime | String | 2018-05-14T14:18:00Z |
The time when the launch template was created. |
CreatedBy | String | 1234567890 |
The creator of the launch template. |
DefaultVersionNumber | Long | 1 |
The default version number of the launch template. |
LatestVersionNumber | Long | 1 |
The latest version number of the launch template. |
LaunchTemplateId | String | lt-m5e3ofjr1zn1aw7q**** |
The ID of the launch template. |
LaunchTemplateName | String | wd-152630748**** |
The name of the launch template. |
ModifiedTime | String | 2018-05-14T14:18:00Z |
The time when the launch template was modified. |
ResourceGroupId | String | rg-acfmxazb4p**** |
The ID of the resource group to which the launch template belongs. |
Tags | Array of Tag |
The tags of the launch template. |
|
Tag | |||
TagKey | String | TestKey |
The tag key of the launch template. |
TagValue | String | TestValue |
The tag value of the launch template. |
PageNumber | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | 04F0F334-1335-436C-A1D7-6C044FE12CBA |
The ID of the request. |
TotalCount | Integer | 1 |
The total number of launch templates. |
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
<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
{
"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 failed to be called. |
For a list of error codes, visit the API Error Center.