All Products
Search
Document Center

Resource Orchestration Service:ListTemplates

Last Updated:Jul 17, 2024

Queries a list of private or shared templates.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberlongNo

The page number.
Pages start from page 1.
Default value: 1.

1
PageSizelongNo

The number of entries per page.
Valid values: 1 to 50.
Default value: 10.

10
TemplateNamestringNo

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

MyTemplate
ShareTypestringNo

The sharing type of the template.

Valid values:

  • Private (default): The template belongs to the template owner.
  • Shared: The template is shared with other users.
  • Official: The template is the shared template of the official version.
Private
Tagarray<object>No

The tags. You can specify up to 20 tags.

objectNo

The tag.

KeystringNo

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

You can specify up to 20 tag keys.

usage
ValuestringNo

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

You can specify up to 20 tag values.

deploy
ResourceGroupIdstringNo

The ID of the resource group.
For more information about resource groups, see the "Resource Group" section of What is Resource Management?

rg-acfmxazb4ph6aiy****
IncludeTagsstringNo

Specifies whether to query the tag information. Valid values:

  • Enabled
  • Disabled (default)
Enabled

For more information 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.

10
RequestIdstring

The request ID.

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

The page number.
Pages start from page 1.

1
Templatesarray<object>

The templates.

object

The template.

TemplateARNstring

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

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

The time when the template was last updated.

2019-10-15T08:17:14.000000
Descriptionstring

The description of the template.

test-description
CreateTimestring

The time when the template was created.

2019-10-15T08:17:14.000000
TemplateNamestring

The template name.

demo
TemplateVersionstring

The latest version of the template.

v1
TemplateIdstring

The template ID.

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

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

151266687691****
ShareTypestring

The sharing type of the template.

Valid values:

  • Private: The template belongs to the template owner.
  • Shared: The template is shared with other users.
Private
ResourceGroupIdstring

The ID of the resource group.

rg-acfmxazb4ph6aiy****
Tagsarray<object>

The tags of the template.

object

The tag of the template.

Keystring

The key of the tag.

usage
Valuestring

The value of the tag.

test

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"
        }
      ]
    }
  ]
}

Error codes

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

Change history

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