All Products
Search
Document Center

Resource Orchestration Service:ListTemplates

Last Updated:Mar 05, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

List Templates

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ros:ListTemplateslist
*Template
acs:ros:{#regionId}:{#accountId}:template/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberlongNo

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

1
PageSizelongNo

The number of entries per page in a paginated query.
Value range: 1~50.
Default value: 10.

10
TemplateNamestringNo

The name of the template. This parameter is effective only when ShareType is Private.
The length must not exceed 255 characters and must start with a digit or a letter. It can contain digits, letters, hyphens (-), and underscores (_).

MyTemplate
ShareTypestringNo

The sharing type of the template.

Values:

  • Private (default): The template is owned by the user.
  • Shared: The template is shared by other users.
  • Official: The template is officially shared.
Private
Tagarray<object>No

Tags. A maximum of 20 tags are supported.

objectNo

Tag.

KeystringNo

The key of the tag. This parameter is effective only when ShareType is Private.

A maximum of 20 tag keys are supported.

usage
ValuestringNo

The value of the tag. This parameter is effective only when ShareType is Private.

A maximum of 20 tag values are supported.

deploy
ResourceGroupIdstringNo

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

rg-acfmxazb4ph6aiy****
IncludeTagsstringNo

Whether to query tag information. Values:

  • Enabled: Query.
  • Disabled (default): Do not query.
Enabled
Filtersarray<object>No

Filter.

objectNo

Filter.

NamestringNo

The name of the filter. You can choose one or more names for the query. Value range:

  • Categories: Template categories
  • DeployTypes: Deployment types
  • ApplicationScenes: Application scenarios
  • BasicServices: Basic services
  • ResourceTypes: Resource types
  • TemplateNames: Template names
Categories
ValuesarrayNo

The list of filter values.

stringNo

The list of filter values. The value range of N is 1~10.

ROS

For details about common request parameters, see Common Parameters.

Response parameters

ParameterTypeDescriptionExample
object
TotalCountinteger

The total number of templates.

1
PageSizeinteger

The number of entries per page in a paginated query.

10
RequestIdstring

The request ID.

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

The page number of the template list.
Start value: 1.

1
Templatesarray<object>

The list of templates.

Templateobject

The list of templates.

TemplateARNstring

The ARN of the template.

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

The last update time of the template.

2019-10-15T08:17:14.000000
Descriptionstring

Template description.

test-description
CreateTimestring

Creation time.

2019-10-15T08:17:14.000000
TemplateNamestring

Template name.

demo
TemplateVersionstring

Latest template version name.

v1
TemplateIdstring

Template ID.

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

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

151266687691****
ShareTypestring

The sharing type of the template.

Values:

  • Private: The template is owned by the user themselves.
  • Shared: The template is shared by other users.
Private
ResourceGroupIdstring

Resource group ID.

rg-acfmxazb4ph6aiy****
Tagsarray<object>

Tags of the template.

Tagsobject

Tags of the template.

Keystring

Tag key of the template.

usage
Valuestring

Tag value of the template.

test
AdditionalInfoobject

Supplementary information for public templates.

TemplateUrlstring

Link to the template

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

Examples

Sample success responses

JSONformat

{
  "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": {
        "test": "test",
        "test2": 1
      },
      "TemplateUrl": "https://ros-public-templates.oss-cn-hangzhou.aliyuncs.com/demo.yml"
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-11-28The request parameters of the API has changed. The response structure of the API has changedView Change Details
2022-06-09The request parameters of the API has changed. The response structure of the API has changedView Change Details