ListTagResources

更新时间:
复制 MD 格式

You can call the ListTagResources operation to retrieve a list of tags.

Debug

You can test this operation in OpenAPI Explorer. This saves you the trouble of calculating signatures. After a successful call, OpenAPI Explorer automatically generates SDK code examples.

Request parameters

Name

Type

Required

Example value

Description

Action

String

Yes

ListTagResources

A required parameter. Set the value to ListTagResources.

RegionId

String

Yes

cn-hangzhou

The ID of the region where the instance is located.

NextToken

String

No

xxdds

The token used to start the next query.

ResourceType

String

Yes

PolarDBXInstance

The resource type. Set the value to PolarDBXInstance.

ResourceId.N

String

No

pxc-xxxx

The resource ID.

Tag.N.Key

String

No

1

The tag key.

Tag.N.Value

String

No

2

The tag value.

Returned Data

Name

Type

Example value

Description

NextToken

String

xxdd

The token used to start the next query. If this parameter is empty, no more data is returned.

RequestId

String

8734773E-7B21-4A22-9106-CBD245F8SD56

The request ID.

TagResources

Array of TagResource

A list of resources.

TagResource

ResourceType

String

PolarDBXInstance

The resource type.

TagValue

String

1

The tag value.

ResourceId

String

pxc-xxxx

The resource ID.

TagKey

String

1

The tag key.

Examples

Request example

http(s)://[Endpoint]/?Action=ListTagResources
&RegionId=cn-hangzhou
&NextToken=xxdds
&ResourceType=PolarDBXInstance
&ResourceId=["pxc-xxxx"]
&Tag=[{"Key":"1","Value":"2"}]
&<Common request parameters>

Response example

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListTagResourcesResponse>
    <NextToken>xxdd</NextToken>
    <RequestId>8734773E-7B21-4A22-9106-CBD245F8SD56</RequestId>
    <TagResources>
        <ResourceType>PolarDBXInstance</ResourceType>
        <TagValue>1</TagValue>
        <ResourceId>pxc-xxxx</ResourceId>
        <TagKey>1</TagKey>
    </TagResources>
</ListTagResourcesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "NextToken" : "xxdd",
  "RequestId" : "8734773E-7B21-4A22-9106-CBD245F8SD56",
  "TagResources" : [ {
    "ResourceType" : "PolarDBXInstance",
    "TagValue" : "1",
    "ResourceId" : "pxc-xxxx",
    "TagKey" : "1"
  } ]
}

Error codes

Visit the Error Center for more error codes.

Visit the Error Center for more error codes.