All Products
Search
Document Center

Database Autonomy Service:DescribeErrorLogRecords

Last Updated:Jun 10, 2026

Mengkueri detail log kesalahan untuk instans database tertentu dalam rentang pengatur waktu yang ditentukan.

Deskripsi operasi

This operation queries the error log details of an instance within a specified time range.

The following prerequisites must be met to use this operation:

  • Engine: RDS MySQL, RDS PostgreSQL, PolarDB for MySQL, PolarDB for PostgreSQL, PolarDB for PostgreSQL (compatible with Oracle), or ApsaraDB for MongoDB.

  • SDK version: Use the latest version of the Alibaba Cloud SDK.

  • Region: If you call the API via the SDK, set the region ID 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:DescribeErrorLogRecords

none

*All Resource

*

None None

Sintaks permintaan

POST  HTTP/1.1

Parameter permintaan

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

ID instans.

pc-bp1u5mas9exx7****

NodeId

string

No

ID node.

pi-bp16v3824rt73****

Role

string

No

Peran node:

  • db

  • Mongos (Proxy Layanan)

Catatan

Parameter ini hanya didukung untuk Instans Database Apsara for MongoDB.

db

StartTime

integer

Yes

Awal rentang pengatur waktu yang akan dikueri. Nilainya adalah Stempel waktu UNIX. Unit: milidetik.

Penting

Bidang ini bertipe Long. Selama serialisasi dan deserialisasi, Presisi dapat hilang. Pastikan nilainya tidak melebihi 9007199254740991.

.

1731983066000

EndTime

integer

Yes

Akhir rentang pengatur waktu yang akan dikueri. Nilainya adalah Stempel waktu UNIX. Unit: milidetik.

Penting

Bidang ini bertipe Long. Selama serialisasi dan deserialisasi, Presisi dapat hilang. Pastikan nilainya tidak melebihi 9007199254740991.

.

1732069466000

PageNumber

integer

No

Nomor halaman.

1

PageSize

integer

No

Jumlah entri per halaman. Nilai maksimum: 100.

10

Filters

array<object>

No

Kondisi filter.

Catatan

Pemfilteran log kesalahan hanya didukung untuk RDS MySQL, RDS PostgreSQL, PolarDB Basis Data Relasional Cloud-Native for MySQL, PolarDB Basis Data Relasional Cloud-Native for PostgreSQL, dan PolarDB Basis Data Relasional Cloud-Native for PostgreSQL (kompatibel dengan Oracle).

object

No

The filter conditions.

Key

string

No

The filter parameter. Set the value to filters.

filters

Value

string

No

The content of the error log to filter.

deadlock

Elemen respons

Element

Type

Description

Example

object

The returned data.

Code

integer

The returned status code.

200

Message

string

The returned message.

Catatan

If the request is successful, Successful is returned. If the request fails, error information such as an error code is returned.

Successful

RequestId

string

The unique request ID.

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

Success

boolean

Indicates whether the request was successful:

  • true: The request was successful.

  • false: The request failed.

true

Data

object

The data details.

ItemsNumbers

integer

The total number of log details returned.

10

StartTime

string

The beginning of the time range to query. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

2025-07-22T05:48:43Z

EndTime

string

The end of the time range to query. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

2025-07-23T05:48:43Z

TotalRecords

integer

The total number of log details within the time range to query.

100

PageNumbers

integer

The page number of the current query.

1

MaxRecordsPerPage

integer

The maximum number of records displayed per page.

10

Logs

array<object>

The log details.

object

The log details.

CreateTime

string

The time when the error log was generated. The value is a UNIX timestamp. Unit: milliseconds.

Penting

For ApsaraDB for MongoDB instances, the time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

1731983067000

DBInstanceName

string

The node ID.

Catatan

This parameter is supported only for ApsaraDB for MongoDB instances.

d-bp128a003436****

Category

string

The log category. Valid values:

  • NETWORK: network connectivity logs.

  • ACCESS: access control logs.

  • -: common logs.

  • COMMAND: slow query log.

  • SHARDING: cluster logs.

  • STORAGE: storage engine logs.

  • CONNPOOL: connection pool logs.

  • ASIO: asynchronous I/O logs.

  • WRITE: slow update logs.

Catatan

This parameter is supported only for ApsaraDB for MongoDB instances.

NETWORK

ConnInfo

string

The connection information of the log.

Catatan

This parameter is supported only for ApsaraDB for MongoDB instances.

conn18xxxxxx

Content

string

The error log.

2025-07-15T15:14:27.175188+08:00 0 [Note] [MY-012468] [InnoDB] Transactions deadlock detected, dumping detailed information.

Contoh

Respons sukses

JSONformat

{
  "Code": 200,
  "Message": "Successful",
  "RequestId": "AAA17591-B48B-4D31-9CD6-9B9796B2****",
  "Success": true,
  "Data": {
    "ItemsNumbers": 10,
    "StartTime": "2025-07-22T05:48:43Z",
    "EndTime": "2025-07-23T05:48:43Z",
    "TotalRecords": 100,
    "PageNumbers": 1,
    "MaxRecordsPerPage": 10,
    "Logs": [
      {
        "CreateTime": "1731983067000",
        "DBInstanceName": "d-bp128a003436****\n",
        "Category": "NETWORK",
        "ConnInfo": "conn18xxxxxx",
        "Content": "2025-07-15T15:14:27.175188+08:00 0 [Note] [MY-012468] [InnoDB] Transactions deadlock detected, dumping detailed information."
      }
    ]
  }
}

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.