Queries all tag keys.

Note The tag feature is suitable only for Anti-DDoS Pro.

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 DescribeTagKeys

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

RegionId String Yes cn-hangzhou

The region ID of the instance. Set the value to cn-hangzhou, which indicates an Anti-DDoS Pro instance.

ResourceType String Yes INSTANCE

The type of the resource. Set the value to INSTANCE, which indicates an Anti-DDoS Pro instance.

ResourceGroupId String No default

The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group.

PageSize Integer No 10

The number of entries to return on each page.

PageNumber Integer No 1

The number of the page to return. For example, to query the returned results on the first page, set the value to 1.

Response parameters

Parameter Type Example Description
PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

RequestId String 1B0D6FCD-ED11-46B7-9903-D5A45509EC11

The ID of the request.

TagKeys Array

The information of the tag key.

TagCount Integer 6

The total number of resources bound to the tag key.

TagKey String aa1

The tag key.

TotalCount Integer 3

The total number of returned tag keys.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeTagKeys
&RegionId=cn-hangzhou
&ResourceType=INSTANCE
&<Common request parameters>

Sample success responses

XML format

<DescribeTagKeysResponse>
      <TotalCount>3</TotalCount>
      <PageSize>10</PageSize>
      <RequestId>1B0D6FCD-ED11-46B7-9903-D5A45509EC11</RequestId>
      <PageNumber>1</PageNumber>
      <TagKeys>
            <TagCount>6</TagCount>
            <TagKey>aa1</TagKey>
      </TagKeys>
      <TagKeys>
            <TagCount>1</TagCount>
            <TagKey>aa134</TagKey>
      </TagKeys>
      <TagKeys>
            <TagCount>6</TagCount>
            <TagKey>aa2</TagKey>
      </TagKeys>
</DescribeTagKeysResponse>

JSON format

{
    "TotalCount":3,
    "PageSize":10,
    "RequestId":"1B0D6FCD-ED11-46B7-9903-D5A45509EC11",
    "PageNumber":1,
    "TagKeys":[
        {
            "TagCount":6,
            "TagKey":"aa1"
        },
        {
            "TagCount":1,
            "TagKey":"aa134"
        },
        {
            "TagCount":6,
            "TagKey":"aa2"
        }
    ]
}

Error codes

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