List Templates
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ros:ListTemplates | list | *Template acs:ros:{#regionId}:{#accountId}:template/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
PageNumber | long | No | The page number of the template list. | 1 |
PageSize | long | No | The number of entries per page in a paginated query. | 10 |
TemplateName | string | No | The name of the template. This parameter is effective only when ShareType is Private. | MyTemplate |
ShareType | string | No | The sharing type of the template. Values:
| Private |
Tag | array<object> | No | Tags. A maximum of 20 tags are supported. | |
object | No | Tag. | ||
Key | string | No | The key of the tag. This parameter is effective only when ShareType is Private. A maximum of 20 tag keys are supported. | usage |
Value | string | No | The value of the tag. This parameter is effective only when ShareType is Private. A maximum of 20 tag values are supported. | deploy |
ResourceGroupId | string | No | The ID of the resource group. | rg-acfmxazb4ph6aiy**** |
IncludeTags | string | No | Whether to query tag information. Values:
| Enabled |
Filters | array<object> | No | Filter. | |
object | No | Filter. | ||
Name | string | No | The name of the filter. You can choose one or more names for the query. Value range:
| Categories |
Values | array | No | The list of filter values. | |
string | No | 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
Examples
Sample success responses
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": {
"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 time | Summary of changes | Operation |
---|---|---|
2024-11-28 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2022-06-09 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |