Queries the keys of the tags bound to Bastionhost instances.

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 Yes cn-hangzhou

The region ID of the Bastionhost instance.

ResourceType String Yes INSTANCE

The type of the resource.

Set the value to INSTANCE, which indicates that the resource is a Bastionhost instance.

PageSize Integer No 10

The number of entries to return on each page.

PageNumber Integer No 1

The number of the page to return.

Response parameters

Parameter Type Example Description
PageNumber Integer 1

The number of the returned page.

PageSize Integer 10

The number of entries returned per page.

RequestId String 50177258-E817-4D2F-A5C6-3FD7BC4806E3

The ID of the request.

TagKeys Array

The information of tags.

TagCount Integer 2

The number of times the tag key was used.

TagKey String key2

The name of the tag key.

TotalCount Integer 5

The total number of tags returned.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTagKeys
&RegionId=cn-hangzhou
&ResourceType=INSTANCE
&<Common request parameters>

Sample success responses

XML format

<ListTagKeysResponse>
      <TotalCount>5</TotalCount>
      <PageSize>10</PageSize>
      <RequestId>50177258-E817-4D2F-A5C6-3FD7BC4806E3</RequestId>
      <PageNumber>1</PageNumber>
      <TagKeys>
            <TagCount>2</TagCount>
            <TagKey>1</TagKey>
      </TagKeys>
      <TagKeys>
            <TagCount>2</TagCount>
            <TagKey>1234567890</TagKey>
      </TagKeys>
      <TagKeys>
            <TagCount>1</TagCount>
            <TagKey>das</TagKey>
      </TagKeys>
      <TagKeys>
            <TagCount>3</TagCount>
            <TagKey>key1</TagKey>
      </TagKeys>
      <TagKeys>
            <TagCount>2</TagCount>
            <TagKey>key2</TagKey>
      </TagKeys>
</ListTagKeysResponse>

JSON format

{
    "TotalCount":5,
    "PageSize":10,
    "RequestId":"50177258-E817-4D2F-A5C6-3FD7BC4806E3",
    "PageNumber":1,
    "TagKeys":[
        {
            "TagCount":2,
            "TagKey":"1"
        },
        {
            "TagCount":2,
            "TagKey":"1234567890"
        },
        {
            "TagCount":1,
            "TagKey":"das"
        },
        {
            "TagCount":3,
            "TagKey":"key1"
        },
        {
            "TagCount":2,
            "TagKey":"key2"
        }
    ]
}

Error codes

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