Queries all tags in a region.
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ListTags | The operation to perform. Set the value to ListTags. |
| RegionId | String | Yes | cn-shanghai | The ID of the region. To get the region list, call DescribeRegions. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 36D1BE9B-3C4A-425B-947A-69E3D77999C4 | The request ID. |
| Tags | Array of Tag | The tags returned. | |
| Tag | A tag. | ||
| TagKey | String | k1 | The tag key. |
| TagValue | String | v2 | The tag value. |
Examples
Sample request
http(s)://[Endpoint]/?Action=ListTags
&RegionId=cn-shanghai
&<Common request parameters>Sample responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<Tags>
<Tag>
<TagValue/>
<TagKey>k1</TagKey>
</Tag>
<Tag>
<TagValue>v1</TagValue>
<TagKey>k1</TagKey>
</Tag>
<Tag>
<TagValue>v2</TagValue>
<TagKey>k1</TagKey>
</Tag>
<Tag>
<TagValue>v2</TagValue>
<TagKey>k2</TagKey>
</Tag>
<Tag>
<TagValue>v3</TagValue>
<TagKey>k3</TagKey>
</Tag>
<Tag>
<TagValue>single</TagValue>
<TagKey>type</TagKey>
</Tag>
</Tags>
<RequestId>36D1BE9B-3C4A-425B-947A-69E3D77999C4</RequestId>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Tags" : {
"Tag" : [ {
"TagValue" : "",
"TagKey" : "k1"
}, {
"TagValue" : "v1",
"TagKey" : "k1"
}, {
"TagValue" : "v2",
"TagKey" : "k1"
}, {
"TagValue" : "v2",
"TagKey" : "k2"
}, {
"TagValue" : "v3",
"TagKey" : "k3"
}, {
"TagValue" : "single",
"TagKey" : "type"
} ]
},
"RequestId" : "36D1BE9B-3C4A-425B-947A-69E3D77999C4"
}Error codes
For a list of error codes, see the Error Center.
该文章对您有帮助吗?