Queries the tags that are added to AnalyticDB for MySQL clusters, or the AnalyticDB for MySQL clusters that have tags 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 |
---|---|---|---|---|
adb:ListTagResources | List |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the cluster. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
ResourceType | string | Yes | The type of the resource. Set the value to cluster. | cluster |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. | 212db86sca4384811e0b5e8707ec21345 |
ResourceId | array | No | The cluster ID. You can specify multiple cluster IDs. Valid values of N: 1 to 50. Note
You must specify at least one of the following parameters: ResourceId.N and Tag.N.Key.
| |
string | No | The cluster ID. You can specify multiple cluster IDs. Valid values of N: 1 to 50. Note
You must specify at least one of the following parameters: ResourceId.N and Tag.N.Key.
| am-bp1l20nxxxxxxxxxx | |
Tag | object [] | No | The tags that are added to clusters. | |
Key | string | No | The key of the tag. You can specify multiple tag keys. The tag key cannot be an empty string. Valid values of N: 1 to 20. Note
You must specify at least one of the following parameters: ResourceId.N and Tag.N.Key.
| testkey1 |
Value | string | No | The value of the tag. You can specify multiple tag values. The tag value can be an empty string. Valid values of N: 1 to 20. | testvalue1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"NextToken": "212db86sca4384811e0b5e8707ec21345",
"RequestId": "184DE106-CB2C-4DD2-B57F-396652E6C8F8",
"TagResources": {
"TagResource": [
{
"ResourceType": "cluster",
"TagValue": "testvalue1",
"ResourceId": "am-bp1l20nxxxxxxxxxx",
"TagKey": "testkey1"
}
]
}
}
Error codes
For a list of error codes, visit the Service error codes.