All Products
Search
Document Center

Bastionhost:ListTagResources

Last Updated:Apr 18, 2024

Queries the tags bound to one or more Bastionhost instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the Bastionhost instance.

cn-hangzhou
ResourceTypestringYes

The type of the resource.

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

INSTANCE
NextTokenstringNo

The token for starting the next query.

6EwFJmScBXFFC3nf.9Rq7HzA7APx7GWLbkZbjHrR6Pq39w
ResourceIdarrayNo

The IDs of instances. The ID is up to 20.

stringNo

The ID of instance.

Note You can call the DescribeInstances operation to obtain the ID of the Bastionhost instance.
2
Tagobject []No

The tags.

KeystringNo

The key of tag N.

Valid values of N: 1 to 20.

test
ValuestringNo

The value of tag N.

Valid values of N: 1 to 20.

testapi

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

The token for starting the next query.

4ieSWJCwxvW3dk3wF.BqkrZmP72nWu5zJ5NWydMqyEs****
RequestIdstring

The ID of the request.

134D6018-EB68-4B7C-BABF-4DB09023E014
TagResourcesobject []

The information about Bastionhost instances and the tags bound to Bastionhost instances.

The following information is included: instance ID, resource type, tag key, and tag value.

TagValuestring

The value of the tag.

testapi
ResourceTypestring

The type of the resource.

The returned value is INSTANCE, which indicates that the resource is a Bastionhost instance.

INSTANCE
ResourceIdstring

The ID of the instance.

bastionhost-cn-78v1gc****
TagKeystring

The key of the tag.

test

Examples

Sample success responses

JSONformat

{
  "NextToken": "4ieSWJCwxvW3dk3wF.BqkrZmP72nWu5zJ5NWydMqyEs****",
  "RequestId": "134D6018-EB68-4B7C-BABF-4DB09023E014",
  "TagResources": [
    {
      "TagValue": "testapi",
      "ResourceType": "INSTANCE",
      "ResourceId": "bastionhost-cn-78v1gc****",
      "TagKey": "test"
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.