Queries the keys of created tags.

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 ListTagKeys

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

RegionId String No cn-hangzhou

The ID of the region.

MaxResults Integer No 50

The maximum number of results on each page. Valid values: 10 to 100. Default value: 50.

NextToken String No djsdlkasd

The token that is used to retrieve the next page of results.

ResourceType String No template

The type of the tagged resource.

Response parameters

Parameter Type Example Description
Keys List ["k3","k2","k1"]

The list of tag keys.

MaxResults Integer 50

The maximum number of results on each page.

NextToken String 87y29h80h20h3f2

The token that is used to retrieve the next page of results.

RequestId String 36210B73-8262-4D08-9D3A-7F96789733C8

The ID of the request.

Examples

Sample requests

http(s)://oos.cn-hangzhou.aliyuncs.com/? Action=ListTagKeys
&<Common request parameters>

Sample success responses

XML format

<ListTagKeysResponse>
<RequestId>36210B73-8262-4D08-9D3A-7F96789733C8</RequestId>
<NextToken>e16333dsads3058fc897878ae</NextToken>
<Keys>k3</Keys>
<Keys>k2</Keys>
<Keys>k1</Keys>
<Keys>k4</Keys>
<Keys>key55</Keys>
<Keys>ew</Keys>
<Keys>oos</Keys>
<Keys>scaling_group</Keys>
<Keys>aa</Keys>
</ListTagKeyseResponse>

JSON format

{
    "RequestId": "36210B73-8262-4D08-9D3A-7F96789733C8",
    "NextToken": "e16333dsads3058fc897878ae",
    "Keys": [
        "k3",
        "k2",
        "k1",
        "k4",
        "key55",
        "ew",
        "oos",
        "scaling_group",
        "aa"
    ]
}

Error codes

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