Queries all tags in a region.

Request parameters

Parameter Type Required Example Description
Action String Yes ListTags

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

RegionId String Yes cn-shanghai

The ID of the region. You can call the DescribeRegions operation to query the most recent region list.

Response parameters

Parameter Type Example Description
RequestId String 36D1BE9B-3C4A-425B-947A-69E3D77999C4

The ID of the request.

Tags Array of Tag

The tags that are queried.

Tag
TagValue String v2

The value of the tag.

TagKey String k1

The key of the tag.

Examples

Sample requests

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, visit the API Error Center.