You can call this operation to query all tags in the region.

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 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

The list of tags.

TagKey String k1

The key of the tag.

TagValue String v2

The value of the tag.

Examples

Sample requests

http(s)://[Endpoint]/? Action=ListTags
&RegionId=cn-shanghai
&<Common request parameters>

Sample success responses

XML format

<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

{
  "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.