All Products
Search
Document Center

Elastic Compute Service:DescribeLaunchTemplates

Last Updated:Jun 18, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeLaunchTemplates

get

LaunchTemplate

acs:ecs:{#regionId}:{#accountId}:launchtemplate/*

LaunchTemplate

acs:ecs:{#regionId}:{#accountId}:launchtemplate/{#launchtemplateId}

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.

  • You can query up to 100 launch templates at a time.

  • You must specify LaunchTemplateId or LaunchTemplateName to determine the templates.

lt-m5e3ofjr1zn1aw7q****

string

No

The launch template ID.

  • You can query up to 100 launch templates at a time.

  • You must specify LaunchTemplateId or LaunchTemplateName to determine the templates.

lt-m5e3ofjr1zn1aw7q****

LaunchTemplateName

array

No

An array of one or more launch template names.

  • You can query up to 100 launch templates at a time.

  • You must specify LaunchTemplateId or LaunchTemplateName to determine the templates.

wd-152630748****

string

No

The name of the launch template.

  • You can query up to 100 launch templates at a time.

  • You must specify LaunchTemplateId or LaunchTemplateName to determine the templates.

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.