Queries the tags that are attached to specified resources.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeTagResources |
The operation that you want to perform. Set the value to DescribeTagResources. |
ResourceId.N | RepeatList | Yes | 1 |
The ID of the resource for which tags are queried. Specify an accelerated domain name as the resource ID. Valid values of N: 1 to 50. |
ResourceType | String | Yes | DOMAIN |
The resource type. Set the value to DOMAIN. |
Tag.N.Key | String | No | key |
The key of the tag. Valid values of N: 1 to 20. |
Tag.N.Value | String | No | value |
The value of the tag. Valid values of N: 1 to 20. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 34AB41F1-04A5-496F-8C8D-634BDBE6A9FB |
The ID of the request. |
TagResources | Array of TagResource |
The tags that are attached to the specified resource. |
|
ResourceId | String | 1 |
The ID of the resource. |
Tag | Array of Tag |
The key-value pair of the tag. |
|
Key | String | env |
The key of the tag. |
Value | String | product |
The value of the tag. |
Examples
Sample requests
https://cdn.aliyuncs.com/?Action=DescribeTagResources
&ResourceId.1=1
&ResourceType=DOMAIN
&<Common request parameters>
Sample success responses
XML
format
<DescribeTagResourcesResponse>
<TagResources>
<ResourceId>1</ResourceId>
<Tag>
<Value>product</Value>
<Key>env</Key>
</Tag>
</TagResources>
<RequestId>34AB41F1-04A5-496F-8C8D-634BDBE6A9FB</RequestId>
</DescribeTagResourcesResponse>
JSON
format
{
"TagResources": [
{
"ResourceId": "1",
"Tag": [
{
"Value": "product",
"Key": "env"
}
]
}
],
"RequestId": "34AB41F1-04A5-496F-8C8D-634BDBE6A9FB"
}
Error codes
For a list of error codes, visit the API Error Center.