Retrieves deduplicated statistics of SQL statements by resource group, database, username, and source IP address for an AnalyticDB for MySQL cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
adb:DescribeDiagnosisDimensions |
get |
DBCluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The ID of the AnalyticDB for MySQL Data Warehouse Edition (V3.0) cluster. Note
You can call the DescribeDBClusters operation to query the IDs of all AnalyticDB for MySQL Data Warehouse Edition (V3.0) clusters within a region. |
am-bt6u59zcmd945**** |
| StartTime |
string |
Yes |
The start of the time range to query. Set this parameter to a UNIX timestamp in milliseconds. Note
Only data from the last 14 days can be queried. Querying older data returns an empty string. |
1625220210000 |
| EndTime |
string |
Yes |
The end of the time range to query. Set this parameter to a UNIX timestamp in milliseconds. Note
|
1625220213000 |
| RegionId |
string |
Yes |
The region ID of the cluster. Note
You can call the DescribeRegions operation to query the most recent list of regions. |
cn-hangzhou |
| QueryCondition |
string |
Yes |
The query condition for SQL statements, specified in JSON format. Use a combination of the
|
{"Type":"maxCost","Value":"100"} |
| Lang |
string |
No |
The language of file titles and error messages. Valid values:
|
zh |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| ClientIps |
array |
The source IP addresses. |
|
|
string |
The source IP address. |
106.11.xx.xx |
|
| ResourceGroups |
array |
The resource groups. |
|
|
string |
The name of the resource group. |
user_default |
|
| UserNames |
array |
The usernames. |
|
|
string |
The username. |
test_user |
|
| Databases |
array |
The databases. |
|
|
string |
The name of the database. |
tpch_1g |
|
| RequestId |
string |
The request ID. |
E0B56BCD-1BED-30EC-8CAF-1D1E5F****** |
Examples
Success response
JSON format
{
"ClientIps": [
"106.11.xx.xx"
],
"ResourceGroups": [
"user_default"
],
"UserNames": [
"test_user"
],
"Databases": [
"tpch_1g"
],
"RequestId": "E0B56BCD-1BED-30EC-8CAF-1D1E5F******"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.