All Products
Search
Document Center

AnalyticDB:DescribeDBClusterPerformance

Last Updated:Apr 03, 2025

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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.
OperationAccess levelResource typeCondition keyAssociated operation
adb:DescribeDBClusterPerformancelist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

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-************
KeystringYes

The key of the performance metric that you want to query. Separate multiple keys with commas (,). For more information about the performance metrics, see Metric overview.

AnalyticDB_CPU
StartTimestringYes

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
EndTimestringYes

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
RegionIdstringYes

The region ID of the cluster.

cn-hangzhou
ResourcePoolsstringNo

The name of the resource group.

test

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

EndTimestring

The end time of the query. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-05-03T15:01:00Z
RequestIdstring

The request ID.

25B56BC7-4978-40B3-9E48-4B7067******
StartTimestring

The start time of the query. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-05-03T15:00:00Z
DBClusterIdstring

The cluster ID.

am-************
Performancesarray<object>

The queried performance metrics.

PerformanceItemobject

The queried performance metric.

Keystring

The name of the performance metric.

AnalyticDB_CPU
Unitstring

The unit of the performance metric.

%
Seriesarray<object>

The queried performance metric data.

SeriesItemobject

The queried performance metric data.

Valuesarray

The values of the queried performance metric.

Valuesstring

The value of the performance metric at a specific point in time.

[ "2021-05-03T15:00:12.72Z", "0.1250" ], [ "2021-05-03T15:00:42.739Z", "0.3125" ]
Namestring

The name of the performance metric value. For more information about the performance metrics, see Metric overview.

worker_avg_cpu_used
Tagsstring

The tags that are added to the cluster.

instance_name: "amv-8vbf80pjcz*****"
TranslateKeystring

The key that is used to obtain the name of the performance metric value.

elastic_executor_avg_cpu_use
AccessDeniedDetailstring

The information about the request denial. This parameter is returned only if Resource Access Management (RAM) permission verification failed.

{ "AuthAction": "xxx", "AuthPrincipalDisplayName": "sampleName", "AuthPrincipalOwnerId": "111111111111111111", "AuthPrincipalType": "SubUser", "AuthResource": "xxx", "NoPermissionType": "xxx", "PolicyType": "xxx" }

Examples

Sample success responses

JSONformat

{
  "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*****\"",
          "TranslateKey": "elastic_executor_avg_cpu_use"
        }
      ]
    }
  ],
  "AccessDeniedDetail": "{\n  \"AuthAction\": \"xxx\",\n  \"AuthPrincipalDisplayName\": \"sampleName\",\n  \"AuthPrincipalOwnerId\": \"111111111111111111\",\n  \"AuthPrincipalType\": \"SubUser\",\n  \"AuthResource\": \"xxx\",\n  \"NoPermissionType\": \"xxx\",\n  \"PolicyType\": \"xxx\"\n}"
}

Error codes

HTTP status codeError codeError message
400IdempotentParameterMismatchThe 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 timeSummary of changesOperation
2024-11-08The Error code has changed. The response structure of the API has changedView Change Details
2023-10-10API Description Update. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-04-06The Error code has changedView Change Details