You can call this operation to query the tag list by specifying the resource ID or tag key.

Either the resource ID or the tag key must be specified. Otherwise, an error is returned.


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.

RegionId String Yes cn-hangzhou

The ID of the region.

ResourceId.N RepeatList No bds-bp15e022622fk0w1

The ID of resource N. Set the value to the cluster ID. You can query the tags of multiple resources. You can specify the parameter name in the format of ResourceId.2, ResourceId.3, ... N is a positive integer.

Tag.N.Key String No key1

The key of the tag that you want to query. You can specify multiple tag keys. N is a positive integer.

Tag.N.Value String No value1

The value of the tag that you want to query. You can specify multiple values. N is a positive integer.

NextToken String No NextToken

The token used to query the next page. You can use the NextToken parameter to query the next page.

Response parameters

Parameter Type Example Description
RequestId String 74F02441-9A8D-48F6-933F-E317AEB28DBF

The ID of the request.

NextToken String 1d2db86sca4384811e0b5e8707e68181f

The token used to query the next page. If the NextToken parameter is empty, all data entries are returned.

TagResources Array

The list of tag resources. For more information, see TagResources.

TagKey String k1

The key of the tag.

TagValue String v2

The value of the tag.


The type of the resource.

ResourceId String bds-bp15e022622fk0w1

The ID of the resource.


Sample requests

http(s)://[Endpoint]/? Action=ListTagResources
&<Common request parameters>

Sample success responses

XML format


JSON format

  "TagResources": {
    "TagResource": [
        "ResourceType": "ALIYUN::MULTIMOD::CLUSTER",
        "TagValue": "v2",
        "ResourceId": "bds-bp15e022622fk0w1",
        "TagKey": "k1"
        "ResourceType": "ALIYUN::MULTIMOD::CLUSTER",
        "TagValue": "value2",
        "ResourceId": "bds-bp15e022622fk0w1",
        "TagKey": "key1"
  "RequestId": "74F02441-9A8D-48F6-933F-E317AEB28DBF"

Error codes

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