指定された時間範囲内の特定のデータベースインスタンスのエラーログの詳細を照会します。
操作説明
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.
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
hdm:DescribeErrorLogRecords |
none |
*All Resource
|
なし | なし |
リクエスト構文
POST HTTP/1.1
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| InstanceId |
string |
必須 |
インスタンス ID。 |
pc-bp1u5mas9exx7**** |
| NodeId |
string |
任意 |
ノード ID。 |
pi-bp16v3824rt73**** |
| Role |
string |
任意 |
ノードロール:
説明
このパラメーターは、ApsaraDB for MongoDB インスタンスでのみサポートされます。 |
db |
| StartTime |
integer |
必須 |
クエリする時間範囲の開始時刻。値は UNIX タイムスタンプです。単位: ミリ秒。 重要
このフィールドは Long 型です。シリアル化およびデシリアル化の際に、精度が失われる可能性があります。値が 9007199254740991 を超えないようにしてください。 。 |
1731983066000 |
| EndTime |
integer |
必須 |
クエリする時間範囲の終了時刻。値は UNIX タイムスタンプです。単位: ミリ秒。 重要
このフィールドは Long 型です。シリアル化およびデシリアル化の際に、精度が失われる可能性があります。値が 9007199254740991 を超えないようにしてください。 。 |
1732069466000 |
| PageNumber |
integer |
任意 |
ページ番号。 |
1 |
| PageSize |
integer |
任意 |
ページあたりのエントリ数。最大値: 100。 |
10 |
| Filters |
array<object> |
任意 |
フィルター条件。 説明
エラーログのフィルタリングは、RDS MySQL、RDS PostgreSQL、PolarDB for MySQL、PolarDB for PostgreSQL、および PolarDB for PostgreSQL (Oracle 互換) でのみサポートされます。 |
|
|
object |
任意 |
The filter conditions. |
||
| Key |
string |
任意 |
The filter parameter. Set the value to filters. |
filters |
| Value |
string |
任意 |
The content of the error log to filter. |
deadlock |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
The returned data. |
||
| Code |
integer |
The returned status code. |
200 |
| Message |
string |
The returned message. 説明
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 |
| 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 |
1731983067000 |
|
| DBInstanceName |
string |
d-bp128a003436**** |
|
| Category |
string |
NETWORK |
|
| ConnInfo |
string |
conn18xxxxxx |
|
| Content |
string |
2025-07-15T15:14:27.175188+08:00 0 [Note] [MY-012468] [InnoDB] Transactions deadlock detected, dumping detailed information. |
例
成功レスポンス
JSONJSON
{
"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."
}
]
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。