All Products
Search
Document Center

Database Autonomy Service:GetDeadLockHistory

Last Updated:Jun 10, 2026

Mengambil riwayat Tugas analisis untuk analisis deadlock terbaru dan penuh.

Deskripsi operasi

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.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

hdm:GetDeadLockHistory

none

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

ID Instans.

pc-bp1u5mas9exx7****

NodeId

string

No

ID node.

Catatan

Tentukan ID node untuk Instans PolarDB Basis Data Relasional Cloud-Native for MySQL.

pi-bp16v3824rt73****

PageNo

integer

No

Nomor halaman.

1

PageSize

integer

No

Jumlah entri per halaman. Nilai maksimum adalah 100.

10

StartTime

integer

Yes

Pengatur waktu mulai kueri. Nilai ini adalah Stempel waktu UNIX. Unit: milidetik.

Penting

Parameter ini adalah nilai Long. Untuk mencegah loss Presisi selama serialisasi dan deserialisasi, pastikan nilai tidak melebihi 9007199254740991.

1731983066000

EndTime

integer

Yes

Pengatur waktu akhir kueri. Nilai ini adalah Stempel waktu UNIX. Unit: milidetik.

Penting

Parameter ini adalah nilai Long. Untuk mencegah loss Presisi selama serialisasi dan deserialisasi, pastikan nilai tidak melebihi 9007199254740991.

1732069466000

Source

string

No

Sumber Tugas:

  • MANUAL atau tidak ditentukan: mengkueri Tugas untuk analisis deadlock terbaru.

  • AUTO: mengkueri Tugas untuk analisis deadlock penuh.

Penting

Jika Anda mengatur parameter ini ke AUTO untuk mengkueri Tugas analisis deadlock penuh, pengatur waktu mulai maksimum tujuh hari lebih awal dari pengatur waktu akhir.

AUTO

Elemen respons

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

B6D17591-B48B-4D31-9CD6-9B9796B2****

Message

string

The returned message.

Catatan

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: The total number of deadlocks.

  • list: The list of deadlocks.

    • accountId: The user ID.

    • textId: The text ID of the deadlock.

    • gmtModified: The time when the diagnostics were generated.

    • lockTime: The time when the deadlock occurred.

    • gmtCreate: The time when the diagnostics were created.

    • nodeId: The node ID.

    • uuid: The instance ID.

{ "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: The request was successful.

  • false: The request failed.

true

Contoh

Respons sukses

JSONformat

{
  "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"
}

Kode kesalahan

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.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.