All Products
Search
Document Center

Database Autonomy Service:GetPartitionsHeatmap

Last Updated:Apr 25, 2024

Queries access frequency statistics and hot data on partitions of a PolarDB-X 2.0 instance.

Operation description

We recommend that you do not call this operation. The data is returned in a special format and is complex to parse. You can use the heatmap feature of Database Autonomy Service (DAS) to query the data.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
hdm:GetPartitionsHeatmapRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ConsoleContextstringNo

The reserved parameter.

None
InstanceIdstringNo

The instance ID.

pxc-hzrciqy62c****
TimeRangestringNo

The time range to be queried. Valid values:

  • LAST_ONE_HOURS: the last hour.
  • LAST_SIX_HOURS: the last six hours.
  • LAST_ONE_DAYS: the last day.
  • LAST_THREE_DAYS: the last three days.
  • LAST_SEVEN_DAYS: the last seven days.
LAST_SIX_HOURS
TypestringNo

The type of the data to be queried. Valid values:

  • READ_ROWS: the read rows.
  • WRITTEN_ROWS: the written rows.
  • READ_WRITTEN_ROWS: the read and written rows.
  • UPDATE_ROWS: the updated rows.
  • INSERTED_ROWS: the inserted rows.
  • DELETED_ROWS: the deleted rows.
  • READ_ROWS_WITH_DN: the read rows returned from a data node.
  • WRITTEN_ROWS_WITH_DN: the written rows returned from a data node.
  • READ_WRITTEN_ROWS_WITH_DN: the read and written rows returned from a data node.
WRITTEN_ROWS_WITH_DN

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Codestring

The HTTP status code returned.

200
Messagestring

The returned message.

Note If the request was successful, Successful is returned. If the request failed, an error message that contains information such as an error code is returned.
Successful
Datastring

The hot data of the PolarDB-X 2.0 instance. The data is returned in JSON format.

{ "boundAxis": [ { "bound": "A,B,C,D", "labels": [ "L1", "L2", "L3", "L4" ], "rows": 3171 }, { "bound": "A,B,C,D", "labels": [ "L1", "L2", "L3", "L4" ], "rows": 277128 } ], "dataMap": { "READ_WRITTEN_ROWS": [ [ 0, 0, 0 ], [ 0, 0, 0 ] ] }, "timeAxis": [ 1671701056070, 1671701116551, 1671701177020 ] }
RequestIdstring

The request ID.

D00DB161-FEF6-5428-B37A-8D29A4C2****
Successstring

Indicates whether the request was successful. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "Successful",
  "Data": "{\n    \"boundAxis\": [\n        {\n            \"bound\": \"A,B,C,D\",\n            \"labels\": [\n                \"L1\",\n                \"L2\",\n                \"L3\",\n                \"L4\"\n            ],\n            \"rows\": 3171\n        },\n        {\n            \"bound\": \"A,B,C,D\",\n            \"labels\": [\n                \"L1\",\n                \"L2\",\n                \"L3\",\n                \"L4\"\n            ],\n            \"rows\": 277128\n        }\n    ],\n    \"dataMap\": {\n        \"READ_WRITTEN_ROWS\": [\n            [\n                0,\n                0,\n                0\n            ],\n            [\n                0,\n                0,\n                0\n            ]\n        ]\n    },\n    \"timeAxis\": [\n        1671701056070,\n        1671701116551,\n        1671701177020\n    ]\n}",
  "RequestId": "D00DB161-FEF6-5428-B37A-8D29A4C2****",
  "Success": "true"
}

Error codes

HTTP status codeError codeError message
400InvalidParamsThe request parameters are invalid.
403NoPermissionYou are not authorized to do this action.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history