Queries all tags.
Debugging
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 | Yes | cn-hangzhou |
The region ID. |
ResourceType | String | Yes | INSTANCE |
The type of the resource. Valid value: INSTANCE. |
PageSize | Integer | No | 20 |
The number of entries to return on each page. Valid values: 1 to 50. Default value: 10. |
CurrentPage | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
ResourceGroupId | String | No | test |
The ID of the resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 97935DF1-0289-4AA2-9DD1-72377838B16B |
The ID of the request. |
CurrentPage | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 20 |
The number of entries returned per page. |
TotalCount | Integer | 6 |
The total number of tags. |
TagKeys | Array |
The list of tags and the details of each tag. |
|
TagKey | String | a |
The key of each tag. |
TagCount | Integer | 1 |
The total number of tag values that correspond to each key. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=ListTagKeys
&RegionId=cn-hangzhou
&ResourceType=INSTANCE
&<Common request parameters>
Sample success responses
JSON
format
{
"RequestId":"97935DF1-0289-4AA2-9DD1-72377838B16B",
"TotalCount": 6,
"PageSize": 20,
"CurrentPage": 1,
"TagKeys": [
{
"TagCount": 1,
"TagKey": "a"
},
{
"TagCount": 1,
"TagKey": "testKey1"
},
{
"TagCount": 1,
"TagKey": "testKey2"
},
{
"TagCount": 2,
"TagKey": "testKey3"
},
{
"TagCount": 1,
"TagKey": "testKey4"
},
{
"TagCount": 1,
"TagKey": "x"
}
]
}
XML
format
<ListTagKeysResponse>
<CurrentPage>1</CurrentPage>
<PageSize>20</PageSize>
<RequestId>97935DF1-0289-4AA2-9DD1-72377838B16B</RequestId>
<TagKeys>
<element>
<TagCount>1</TagCount>
<TagKey>a</TagKey>
</element>
<element>
<TagCount>1</TagCount>
<TagKey>testKey1</TagKey>
</element>
<element>
<TagCount>1</TagCount>
<TagKey>testKey2</TagKey>
</element>
<element>
<TagCount>2</TagCount>
<TagKey>testKey3</TagKey>
</element>
<element>
<TagCount>1</TagCount>
<TagKey>testKey4</TagKey>
</element>
<element>
<TagCount>1</TagCount>
<TagKey>x</TagKey>
</element>
</TagKeys>
<TotalCount>6</TotalCount>
</ListTagKeysResponse>
Error codes
For a list of error codes, visit the API Error Center.