Call the ListTagResources API to list the tags associated with your applications.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:ListTagResources |
get |
*All Resource
|
None | None |
Request syntax
GET /tags HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-beijing |
| ResourceType |
string |
Yes |
The resource type. Only |
application |
| NextToken |
string |
No |
A query can return a maximum of 50 results. If the number of results exceeds this limit, the response includes a NextToken. To retrieve the next page of results, pass this token in your next request. |
A2RN |
| ResourceIds |
string |
No |
The resource IDs, specified as a JSON array of strings. This parameter is required if the Tags parameter is not specified. |
["d42921c4-5433-4abd-8075-0e536f8b****"] |
| Tags |
string |
No |
The tags used to filter resources. This parameter is required if the ResourceIds parameter is not specified. A tag is a key-value pair.
Tag keys and tag values are case-sensitive. If you specify multiple tags, the operation returns only resources that have all the specified tags. A tag key cannot start with |
[{"key":"k1","value":"v1"}] |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned. |
||
| RequestId |
string |
The request ID. |
7414187F-4F59-4585-9BCF-5F0804E4**** |
| Message |
string |
The message returned for the request.
|
success |
| TraceId |
string |
The trace ID that is used to query the details of a request. |
0bc5f84e15916043198032146d**** |
| Data |
object |
The data returned. |
|
| NextToken |
string |
The token that is used to retrieve the next page of results. A query returns a maximum of 50 results. If the results are truncated, you can use this token in a subsequent request to retrieve the next page of results. |
"" |
| TagResources |
array<object> |
The list of tags and their associated resources. |
|
|
object |
The details of a tag and the resource to which the tag is added. |
||
| ResourceType |
string |
The type of the resource. The value is fixed as |
ALIYUN::SAE::APPLICATION |
| TagValue |
string |
The value of the tag. |
v1 |
| ResourceId |
string |
The ID of the application. |
d42921c4-5433-4abd-8075-0e536f8b**** |
| TagKey |
string |
The key of the tag. |
k1 |
| ErrorCode |
string |
The error code.
|
|
| Code |
string |
The HTTP status code.
|
200 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"RequestId": "7414187F-4F59-4585-9BCF-5F0804E4****",
"Message": "success",
"TraceId": "0bc5f84e15916043198032146d****",
"Data": {
"NextToken": "\"\"",
"TagResources": [
{
"ResourceType": "ALIYUN::SAE::APPLICATION",
"TagValue": "v1",
"ResourceId": "d42921c4-5433-4abd-8075-0e536f8b****",
"TagKey": "k1"
}
]
},
"ErrorCode": "",
"Code": "200",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | |
| 400 | InvalidResourceType.NotFound | The specified resource type is not supported. | |
| 400 | NumberExceed.Tags | The specified parameter Tags count exceed. | |
| 400 | Invalid.Param.Tag.Scope | The specified parameter is invalid: tag scope. | |
| 400 | No.Permission | The account has no permission. | |
| 400 | NumberExceed.ResourceIds | The number of resource IDs cannot exceed 50. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.