You can call the DescribeTagResources operation to query the tags of a resource.

Request parameters

Parameter Type Required Description
Action String  Yes The operation that you want to perform. Set this parameter to DescribeTagResources.
ResourceId.N String  Yes The ID of the resource to query tags for. Specify a CDN domain name as the resource ID. Valid values of N: 1 to 50.
ResourceType String Yes The resource type. Set this value to DOMAIN.

Examples

Sample request

https://cdn.aliyuncs.com/?Action=DescribeTagResources
&ResourceId. 1=example.com
&ResourceType=DOMAIN
&<Common request parameters>

Sample success response

JSON format

{
  "TagResources": [
    {
      "ResourceId": "example.com",
      "Tag": [
        {
          "Value": "product",
          "Key": "env"
        }
      ]
    }
  ],
  "RequestId": "34AB41F1-04A5-496F-8C8D-634BDBE6A9FB"
}