Queries a list of private and shared templates.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:ListTemplates |
list |
*Template
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageNumber |
integer |
No |
The page number of the template list. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page for a paged query. |
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 |
| 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. |
rg-acfmxazb4ph6aiy**** |
| IncludeTags |
string |
No |
Specifies whether to query tag information. Valid values:
|
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 |
| 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. |
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 |
| 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.