Queries for resources and tags based on specified conditions.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-shanghai |
| ResourceId |
array |
No |
A list of resource IDs. |
|
|
string |
No |
The resource ID. |
my-resource-id |
|
| Tag |
array<object> |
No |
A list of tags. |
|
|
object |
No |
The tag information. |
||
| Key |
string |
No |
The tag key of the resource. |
env |
| Value |
string |
No |
The tag value. |
dev |
| TagOwnerUid |
string |
No |
The ID of the Alibaba Cloud account that owns the tag. |
xxx1234xxx |
| TagOwnerBid |
string |
No |
The BID of the tag owner. |
26842 |
| ResourceType |
string |
Yes |
The resource type. |
DOMAIN |
| NextToken |
string |
No |
The token to start the next query. |
q2j8bLtBdhONLRkgaPBa6A== |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The token to start the next query. |
6a5e8f4fae643e70d1a2ff1827cd91bd |
| RequestId |
string |
The request ID. |
******3B-0E1A-586A-AC29-742247****** |
| TagResources |
object |
||
| TagResource |
array<object> |
A list of tag resources. |
|
|
object |
The tag resource. |
||
| ResourceId |
string |
The resource ID. |
my-resource-id |
| ResourceType |
string |
The resource type. |
DOMAIN |
| TagKey |
string |
The tag key. |
env |
| TagValue |
string |
The tag value. |
dev |
Examples
Success response
JSON format
{
"NextToken": "6a5e8f4fae643e70d1a2ff1827cd91bd",
"RequestId": "******3B-0E1A-586A-AC29-742247******",
"TagResources": {
"TagResource": [
{
"ResourceId": "my-resource-id",
"ResourceType": "DOMAIN",
"TagKey": "env",
"TagValue": "dev"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 401 | InvalidResourceType | The resourceType is invalid. | The specified resourceType parameter is invalid. |
| 401 | InvalidTagKey | The tag key is invalid, %s. | Invalid tag key. |
| 403 | InvalidResourcesCount | The count of resources is invalid, %s. | The input resource array. The total number of resources cannot exceed the maximum value and must be greater than 0. |
| 403 | Duplicate.TagKey | The tags should not contain duplicate keys. | The tag should not contain duplicate keys. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.