Queries the tags that are added to Anti-DDoS Origin instances.

Usage notes

You can call the ListTagResources operation to query the tags that are added to Anti-DDoS Origin instances at a time.

Limits

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListTagResources

The operation that you want to perform. Set the value to ListTagResources.

ResourceGroupId String No rg-acfm2pz25js****

The ID of the resource group to which the Anti-DDoS Origin instance belongs in Resource Management.

If you do not specify this parameter, the instance belongs to the default resource group.

RegionId String Yes cn-hangzhou

The ID of the region where the Anti-DDoS Origin instance resides.

Note You can call the DescribeRegions operation to query the most recent region list.
ResourceType String Yes INSTANCE

The type of the resource to query. Set the value to INSTANCE, which indicates instances.

NextToken String No RGuYpqDdKhzXb8C3.D1BwQgc1tMBsoxdGiEKHHUUCf****

The query token. Set the value to the NextToken value that is returned in the last call to the ListTagResources operation. Leave this parameter empty the first time you call this operation.

ResourceId.N String No ddosbgp-cn-n6w1r7nz****

The ID of Anti-DDoS Origin Instance N to query.

Note You can call the DescribeInstanceList operation to query the IDs of all Anti-DDoS Origin instances.
Tag.N.Key String No testKey1

The key of the tag to query.

Note The ResourceIds.N parameter and the key-value pair (Tag.N.Key and Tag.N.Value) cannot be left empty at the same time.
Tag.N.Value String No testValue1

The value of the tag to query.

Note The ResourceIds.N parameter and the key-value pair (Tag.N.Key and Tag.N.Value) cannot be left empty at the same time.

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

Parameter Type Example Description
NextToken String RGuYpqDdKhzXb8C3.D1BwQgc1tMBsoxdGiEKHHUUCf****

The query token that is returned in this call.

RequestId String C3F7E6AE-43B2-4730-B6A3-FD17552B8F65

The ID of the request.

TagResources Array of TagResource

The list of tags that are added to the Anti-DDoS Origin instance.

TagResource
TagValue String testValue1

The value of the tag that is added to the instance.

ResourceType String INSTANCE

The type of the resource. The value is fixed as INSTANCE, which indicates instances.

ResourceId String ddosbgp-cn-n6w1r7nz****

The ID of the Anti-DDoS Origin instance.

TagKey String testKey1

The key of the tag that is added to the instance.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTagResources
&RegionId=cn-hangzhou
&ResourceType=INSTANCE
&ResourceId=["ddosbgp-cn-n6w1r7nz****"]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListTagResourcesResponse>
    <NextToken>RGuYpqDdKhzXb8C3.D1BwQgc1tMBsoxdGiEKHHUUCffomr</NextToken>
    <RequestId>C3F7E6AE-43B2-4730-B6A3-FD17552B8F65</RequestId>
    <TagResources>
        <TagValue>testValue1</TagValue>
        <ResourceType>INSTANCE</ResourceType>
        <ResourceId>ddosbgp-cn-n6w1r7nz****</ResourceId>
        <TagKey>testKey1</TagKey>
    </TagResources>
</ListTagResourcesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "NextToken" : "RGuYpqDdKhzXb8C3.D1BwQgc1tMBsoxdGiEKHHUUCffomr",
  "RequestId" : "C3F7E6AE-43B2-4730-B6A3-FD17552B8F65",
  "TagResources" : [ {
    "TagValue" : "testValue1",
    "ResourceType" : "INSTANCE",
    "ResourceId" : "ddosbgp-cn-n6w1r7nz****",
    "TagKey" : "testKey1"
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.