インスタンスの高可用性 (HA) ログを照会します。
操作説明
Only PolarDB for MySQL supports this operation.
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
polardb:DescribeHALogs |
get |
*All Resource
|
なし | なし |
リクエスト構文
POST HTTP/1.1
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| DBClusterId |
string |
必須 |
クラスター ID。 |
pc-**************** |
| DBNodeId |
string |
任意 |
ノード ID。指定した場合、指定されたノードの高可用性 (HA) スイッチオーバー Record をクエリします。 DescribeDBClusters 操作を呼び出して、アカウント配下のすべてのクラスターの詳細情報(ノード ID を含む)をクエリできます。 |
pi-**************** |
| PageNumber |
integer |
任意 |
ページ番号。 |
1 |
| PageSize |
integer |
任意 |
各ページで返すエントリの数。有効な値: 5~50。デフォルト値: 10。 |
30 |
| StartTime |
string |
任意 |
クエリする時間範囲の開始時刻。時間は |
2020-05-01T00:00Z |
| EndTime |
string |
任意 |
クエリする時間範囲の終了時刻。終了時刻は開始時刻より後である必要があります。時間は |
2020-09-23T01:01:00Z |
| LogType |
string |
必須 |
ログタイプ。 |
HaSwitchLogList |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| TotalRecords |
integer |
The total number of records. |
160 |
| ItemsNumbers |
integer |
The number of items in the log list on the current page. |
10 |
| PageNumber |
integer |
The page number. The value is greater than 0 and does not exceed the maximum value of the Integer data type. Default value: 1. |
1 |
| DBInstanceName |
string |
The instance ID. |
pc-a************* |
| DBInstanceType |
string |
The instance type. Valid values:
|
polardb_mysql_rw |
| HaStatus |
integer |
Indicates whether primary/secondary switchover records exist. Valid values:
|
1 |
| HaLogItems |
array<object> |
The list of primary/secondary 这里 AI 机翻使用了 failover,但代码里用了 switch,建议保持一致,都改为 swichover logs. |
|
|
object |
The list of primary/secondary switchover logs. |
||
| SwitchId |
string |
The ID of the primary/secondary switchover log. |
e571f897-9b3c-4012-9470-88333832dec4 |
| SwitchCauseCode |
string |
The cause code of the switchover. |
Platform.Ha.AuroraService.ManualOperations |
| SwitchCauseDetail |
string |
The cause of the switchover. |
Platform.Ha.ManuallyTriggered |
| SwitchStartTime |
string |
The start time of the switchover. |
2025-05-20T03:09:45Z |
| SwitchFinishTime |
string |
The end time of the switchover. |
2025-05-20T03:09:56Z |
| RequestId |
string |
The request ID. |
6BD9CDE4-5E7B-4BF3-9BB8-83C73E****** |
| PageSize |
integer |
The number of entries returned per page. Valid values: 30 to 100. Default value: 30. |
30 |
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | |
| 400 | InvalidPageSize.Malformed | The specified parameter PageSize is not valid. | |
| 400 | InvalidPageNumber.Malformed | The specified parameter PageNumber is not valid. | |
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。