Queries the performance data of an AnalyticDB for MySQL cluster.
Operation description
You can call this operation to query the performance data of a cluster over a time range based on its performance metrics. The data is collected every 30 seconds. This operation allows you to query information about slow queries, such as the SQL query duration, number of scanned rows, and amount of scanned data.
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:DescribeDBClusterPerformance | list |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBClusterId | string | Yes | The ID of the AnalyticDB for MySQL cluster. Note
You can call the DescribeDBClusters operation to query the IDs of all AnalyticDB for MySQL clusters within a region.
| am-************ |
Key | string | Yes | The performance metrics to be queried. Separate multiple values with commas (,). Valid values:
Note
If you leave this parameter empty, the values of all the preceding performance metrics are returned.
| AnalyticDB_CPU |
StartTime | string | Yes | The start time of the query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. | 2021-05-03T15:00Z |
EndTime | string | Yes | The end time of the query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. Note
The end time must be later than the start time. The maximum time range that can be specified is two days.
| 2021-05-03T15:01Z |
RegionId | string | Yes | The region ID of the cluster. | cn-hangzhou |
ResourcePools | string | No | The name of the resource group. | test |
Response parameters
Examples
Sample success responses
JSON
format
{
"EndTime": "2021-05-03T15:01:00Z",
"RequestId": "25B56BC7-4978-40B3-9E48-4B7067******",
"StartTime": "2021-05-03T15:00:00Z",
"DBClusterId": "am-************",
"Performances": [
{
"Key": "AnalyticDB_CPU",
"Unit": "%",
"Series": [
{
"Values": [
"[ \"2021-05-03T15:00:12.72Z\", \"0.1250\" ], [ \"2021-05-03T15:00:42.739Z\", \"0.3125\" ]"
],
"Name": "worker_avg_cpu_used",
"Tags": "instance_name: \"amv-8vbf80pjcz*****\""
}
]
}
]
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-10-10 | API Description Update. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2023-04-06 | The Error code has changed | View Change Details |