All Products
Search
Document Center

CDN:ListTagResources

Last Updated:Mar 28, 2024

Queries the tags that are attached to a resource.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TagOwnerUidstringNo

The ID of the Alibaba Cloud account to which the tag belongs.

123xxxx
TagOwnerBidstringNo

The business ID of the tag owner.

26842
ResourceTypestringYes

The type of the resource. Set the value to DOMAIN.

DOMAIN
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results.

QpgBAAAAAABsb2dzL2RzLw==
ResourceIdarrayNo

The ID of the resource.

stringNo

The ID of the instance N. Valid values of N: 1 to 50.

example.com
Tagobject []No

The key-value pair of a tag.

KeystringNo

The key of the tag.

testKey
ValuestringNo

The value of the tag.

testValue

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

The pagination token that is used in the next request to retrieve a new page of results.

QpgBAAAAAABsb2dzL2RzLw==
RequestIdstring

The request ID.

64D28B53-5902-409B-94F6-FD46680144FE
TagResourcesobject []

The returned correspondence between the resource and tags.

TagValuestring

The value of the tag.

testValue
ResourceTypestring

The type of the resource. Set the value to DOMAIN.

DOMAIN
ResourceIdstring

The ID of the resource.

example.com
TagKeystring

The key of the tag.

testKey

Examples

Sample success responses

JSONformat

{
  "NextToken": "QpgBAAAAAABsb2dzL2RzLw==",
  "RequestId": "64D28B53-5902-409B-94F6-FD46680144FE",
  "TagResources": {
    "TagResource": [
      {
        "TagValue": "testValue",
        "ResourceType": "DOMAIN",
        "ResourceId": "example.com",
        "TagKey": "testKey"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidRegionId.MalformedThe specified RegionId is invalid.-
400MissParameter.TagOrResourceIdEither Tag or ResourceId must be specified.-
400TagIsInvalidThe number of Tag exceeds 20.-
400ResourceIdIsInvalidThe number of ResourceId exceeds 50.The number of resource IDs (ResourceId) cannot exceed 50.
400TagKeyIsInvalidThe specified TagKey is invalid.-
400TagValueIsInvalidThe specified TagValue is invalid.-

For a list of error codes, visit the Service error codes.