All Products
Search
Document Center

Resource Orchestration Service:ListTemplates

Last Updated:Nov 12, 2025

Queries a list of private and shared templates.

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

ros:ListTemplates

list

*Template

acs:ros:{#regionId}:{#accountId}:template/*

None None

Request parameters

Parameter

Type

Required

Description

Example

PageNumber

integer

No

The page number of the template list.
The value starts from 1.
Default value: 1.

1

PageSize

integer

No

The number of entries to return on each page for a paged query.
Valid values: 1 to 50.
Default value: 10.

10

TemplateName

string

No

The name of the template. This parameter takes effect only when ShareType is set to Private. The name can be up to 255 characters in length. It must start with a digit or a letter and can contain digits, letters, hyphens (-), and underscores (_).

MyTemplate

ShareType

string

No

The share type of the template.

Valid values:

  • Private (default): The template is owned by the user.

  • Shared: The template is shared by other users.

  • Official: The template is a shared official template.

Private

Tag

array<object>

No

The tags. You can specify up to 20 tags.

object

No

The tag.

Key

string

No

The tag key. This parameter takes effect only when ShareType is set to Private.

You can specify up to 20 tag keys.

usage

Value

string

No

The tag value. This parameter takes effect only when ShareType is set to Private.

You can specify up to 20 tag values.

deploy

ResourceGroupId

string

No

The ID of the resource group.
For more information about resource groups, see What is a resource group?.

rg-acfmxazb4ph6aiy****

IncludeTags

string

No

Specifies whether to query tag information. Valid values:

  • Enabled: queries tag information.

  • Disabled (default): does not query tag information.

Enabled

Filters

array<object>

No

The filter.

object

No

The filter.

Name

string

No

The filter name. You can select one or more names to query. Valid values:

  • Categories: template category

  • DeployTypes: deployment type

  • ApplicationScenes: application scenario

  • BasicServices: basic service

  • ResourceTypes: resource type

  • TemplateNames: template name

Categories

Values

array

No

The list of filter values.

string

No

The list of filter values. The value of N can be from 1 to 10.

ROS

For more information about common request parameters, see Common parameters.

Response elements

Element

Type

Description

Example

object

TotalCount

integer

The total number of templates.

1

PageSize

integer

The number of entries returned per page.

10

RequestId

string

The request ID.

C3A8413B-1F16-4DED-AC3E-61A00718DE8A

PageNumber

integer

The page number of the template list.
The value starts from 1.

1

Templates

array<object>

The list of templates.

array<object>

The list of templates.

TemplateARN

string

The Alibaba Cloud Resource Name (ARN) of the template.

acs:ros:*:151266687691****:template/a52f81be-496f-4e1c-a286-8852ab54****

UpdateTime

string

The time when the template was last updated.

2019-10-15T08:17:14.000000

Description

string

The description of the template.

test-description

CreateTime

string

The time when the template was created.

2019-10-15T08:17:14.000000

TemplateName

string

The name of the template.

demo

TemplateVersion

string

The name of the latest version of the template.

v1

TemplateId

string

The ID of the template.

4d4f5aa2-3260-4e47-863b-763fbb12****

OwnerId

string

The ID of the Alibaba Cloud account to which the template belongs.

151266687691****

ShareType

string

The share type of the template.

Valid values:

  • Private: The template is owned by the user.

  • Shared: The template is shared by other users.

Private

ResourceGroupId

string

The ID of the resource group.

rg-acfmxazb4ph6aiy****

Tags

array<object>

The tags of the template.

object

The tags of the template.

Key

string

The tag key of the template.

usage

Value

string

The tag value of the template.

test

AdditionalInfo

object

The supplementary information about the public template.

{"DeploymentDuration":null,"Title":"Self-Built_ElasticSearch_Snapshot_Saved_To_OSS","Labels":{"ResourceTypes":["ALIYUN::ECS::Instance","ALIYUN::ECS::SecurityGroup","ALIYUN::ECS::VPC","ALIYUN::ECS::VSwitch","ALIYUN::OSS::Bucket","ALIYUN::ROS::WaitCondition","ALIYUN::ROS::WaitConditionHandle"],"DeployTypes":["ROS"],"ApplicationScenes":["其他"]},"Provider":"ROS","Categories":["Solution"]}

TemplateUrl

string

The URL of the template.

https://ros-public-templates.oss-cn-hangzhou.aliyuncs.com/demo.yml

Examples

Success response

JSON format

{
  "TotalCount": 1,
  "PageSize": 10,
  "RequestId": "C3A8413B-1F16-4DED-AC3E-61A00718DE8A",
  "PageNumber": 1,
  "Templates": [
    {
      "TemplateARN": "acs:ros:*:151266687691****:template/a52f81be-496f-4e1c-a286-8852ab54****",
      "UpdateTime": "2019-10-15T08:17:14.000000",
      "Description": "test-description",
      "CreateTime": "2019-10-15T08:17:14.000000",
      "TemplateName": "demo",
      "TemplateVersion": "v1",
      "TemplateId": "4d4f5aa2-3260-4e47-863b-763fbb12****",
      "OwnerId": "151266687691****",
      "ShareType": "Private",
      "ResourceGroupId": "rg-acfmxazb4ph6aiy****",
      "Tags": [
        {
          "Key": "usage",
          "Value": "test"
        }
      ],
      "AdditionalInfo": {
        "DeploymentDuration": null,
        "Title": "Self-Built_ElasticSearch_Snapshot_Saved_To_OSS",
        "Labels": {
          "ResourceTypes": [
            "ALIYUN::ECS::Instance",
            "ALIYUN::ECS::SecurityGroup",
            "ALIYUN::ECS::VPC",
            "ALIYUN::ECS::VSwitch",
            "ALIYUN::OSS::Bucket",
            "ALIYUN::ROS::WaitCondition",
            "ALIYUN::ROS::WaitConditionHandle"
          ],
          "DeployTypes": [
            "ROS"
          ],
          "ApplicationScenes": [
            "其他"
          ]
        },
        "Provider": "ROS",
        "Categories": [
          "Solution"
        ]
      },
      "TemplateUrl": "https://ros-public-templates.oss-cn-hangzhou.aliyuncs.com/demo.yml"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.