Retrieves the historical analysis tasks for recent and full deadlock analysis.
Operation description
Retrieves the historical analysis records for recent and full deadlock analysis. For more information, see Deadlock analysis.
The following requirements must be met before you call this operation:
To query historical analysis records of recent deadlocks, the destination database engine must be RDS MySQL, self-managed MySQL, PolarDB for MySQL, or PolarDB-X 2.0.
To query historical analysis records of full deadlocks, the destination database engine must be RDS MySQL or PolarDB for MySQL, and DAS Alibaba Cloud Managed Services (formerly known as Economy Edition) must be enabled.
Use the latest version of the Alibaba Cloud SDK or DAS SDK.
When you use an SDK to call the DAS service, set the region to cn-shanghai.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:GetDeadLockHistory |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
pc-bp1u5mas9exx7**** |
| NodeId |
string |
No |
The node ID. Note
Specify the node ID for a PolarDB for MySQL instance. |
pi-bp16v3824rt73**** |
| PageNo |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of entries per page. The maximum value is 100. |
10 |
| StartTime |
integer |
Yes |
The start time of the query. This value is a UNIX timestamp. Unit: milliseconds. Important This parameter is a Long value. To prevent precision loss during serialization and deserialization, make sure that the value does not exceed 9007199254740991. |
1731983066000 |
| EndTime |
integer |
Yes |
The end time of the query. This value is a UNIX timestamp. Unit: milliseconds. Important This parameter is a Long value. To prevent precision loss during serialization and deserialization, make sure that the value does not exceed 9007199254740991. |
1732069466000 |
| Source |
string |
No |
The source of the task:
Important If you set this parameter to AUTO to query tasks for full deadlock analysis, the start time can be a maximum of seven days earlier than the end time. |
AUTO |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Message |
string |
The returned message. Note
If the request is successful, Successful is returned. If the request fails, an error message such as an error code is returned. |
Successful |
| Synchro |
string |
A reserved parameter. |
None |
| Data |
string |
The data returned as a JSON string.
|
{ "total": 2, "list": [ { "accountId": "108************", "textId": "35303d12d52d29ba73bb85fa2d5b****", "gmtModified": 1732712680000, "lockTime": 1732687047000, "gmtCreate": 1732712680000, "nodeId": "pi-8****************", "uuid": "pc-8v**************" }, { "accountId": "108************", "textId": "50a24bdcc5fe7e03f92a55ae7574****", "gmtModified": 1732626448000, "lockTime": 1722500305000, "gmtCreate": 1732626448000, "nodeId": "pi-8****************", "uuid": "pc-8v**************" } ] } |
| Code |
string |
The returned status code. |
200 |
| Success |
string |
Indicates whether the request was successful:
|
true |
Examples
Success response
JSON format
{
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Message": "Successful",
"Synchro": "None",
"Data": "{\n \"total\": 2,\n \"list\": [\n {\n \"accountId\": \"108************\",\n \"textId\": \"35303d12d52d29ba73bb85fa2d5b****\",\n \"gmtModified\": 1732712680000,\n \"lockTime\": 1732687047000,\n \"gmtCreate\": 1732712680000,\n \"nodeId\": \"pi-8****************\",\n \"uuid\": \"pc-8v**************\"\n },\n {\n \"accountId\": \"108************\",\n \"textId\": \"50a24bdcc5fe7e03f92a55ae7574****\",\n \"gmtModified\": 1732626448000,\n \"lockTime\": 1722500305000,\n \"gmtCreate\": 1732626448000,\n \"nodeId\": \"pi-8****************\",\n \"uuid\": \"pc-8v**************\"\n }\n ]\n}",
"Code": "200",
"Success": "true"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.