Queries the hot keys of a specified ApsaraDB for Redis instance.

Before you call this operation, make sure that the following conditions are met:

  • This operation is applicable only to ApsaraDB for Redis.
  • When you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V4.3.3. We recommend that you use the latest version.
  • The version of Database Autonomy Service (DAS) SDK must be V1.0.2 or later.
  • When you call this operation to use DAS, you must specify cn-shanghai as the region.

Request parameters

Parameter Type Required Example Description
Action String No DescribeHotKeys

The operation that you want to perform. Set the value to DescribeHotKeys.

InstanceId String No r-bp18ff4a195d****

The ID of the ApsaraDB for Redis instance. You can call the DescribeInstances operation to query the ID.

NodeId String No r-x****-db-0

The ID of the data shard on the ApsaraDB for Redis instance. You can call the DescribeRoleZoneInfo operation to query the ID.

Response parameters

Parameter Type Example Description
Message String Successful

The message returned for the request.

Note If the request is successful, Successful is returned. If the request fails, an error message such as an error code is returned.
RequestId String B6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

Data Array of HotKey

The details about the hot keys.

Key String abc:def:eng

The name of the key.

Db Integer 0

The database in which the key is stored.

Hot String 5500~6000

The number of queries per second (QPS) of the key.

KeyType String zset

The type of the key.

Size Long 2

The number of elements in the key.

Code String 200

The returned status code.

Success String true

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request failed.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "Message" : "Successful",
  "RequestId" : "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Data" : [ {
    "Key" : "abc:def:eng",
    "Db" : 0,
    "Hot" : "5500~6000",
    "KeyType" : "zset",
    "Size" : 2
  } ],
  "Code" : "200",
  "Success" : "true"

Error codes

For a list of error codes, visit the API Error Center.