Queries the tags that are added to one or more PolarDB clusters, or the PolarDB clusters to which one or more tags are added.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
polardb:ListTagResources | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region. You can call the DescribeRegions operation to query available region IDs. | cn-hangzhou |
ResourceType | string | Yes | The type of the resource. Set the value to cluster. | cluster |
NextToken | string | No | The token required to obtain more results. This parameter is not required in the first query. If the first query does not return all results, you can use the token that is returned from the first query in the next query to obtain more results. | 212db86sca4384811e0b5e8707e****** |
ResourceId | array | No | The IDs of the clusters. To query the tags of multiple clusters, click Add to add cluster IDs. Note
| |
string | No | The IDs of the clusters. To query the tags of multiple clusters, click Add to add cluster IDs. Note
| pc-**************** | |
Tag | array<object> | No | The tags. | |
object | No | |||
Key | string | No | The tag key. To query the details of clusters to which multiple tags are added, click Add to add tags. Note
| type |
Value | string | No | The tag value that is paired with the tag key. This parameter can be set to an empty string. | test |
Response parameters
Examples
Sample success responses
JSON
format
{
"NextToken": "212db86sca4384811e0b5e8707e******",
"RequestId": "688C04E4-23F8-409F-8A38-B954D5******",
"TagResources": {
"TagResource": [
{
"ResourceType": "cluster",
"TagValue": "test",
"ResourceId": "pc-****************",
"TagKey": "type"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NumberExceed.Tags | The Tags parameter`s number is exceed. | The maximum number of tags is reached. |
400 | MissParameter.TagOrResourceId | The parameter Tag.n or ResourceId.n is needed. | The Tag.n or ResourceId.n parameter must be specified. |
400 | NumberExceed.ResourceIds | The ResourceIds parameter's number is exceed. | The number of ResourceIds parameters exceeds the limit. |
404 | InvalidDBClusterId.NotFound | The DBInstanceId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-09-12 | The Error code has changed | View Change Details |