擷取自愈規則列表。
介面說明
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cs:ListAutoRepairPolicies |
none |
*Cluster
|
無 | 無 |
請求文法
GET /clusters/{cluster_id}/auto_repair_policies HTTP/1.1
路徑參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| cluster_id |
string |
否 |
叢集 ID。 |
ce0da5a1d627e4e9e9f96cae8ad07**** |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
當前API無需請求參數
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| items |
array<object> |
自愈規則。 |
|
|
array<object> |
自愈規則。 |
||
| name |
string |
自愈規則名稱。 |
test |
| id |
string |
自愈規則 ID。 |
r-xxxxx |
| resource_type |
string |
自愈規則綁定的資源類型。 |
nodepool |
| resource_sub_type |
string |
自愈規則綁定的資源子類型。 |
ess |
| resource_ids |
array |
自愈規則綁定的資源清單。 |
|
|
string |
自愈規則綁定的資源清單。 |
npxxxxx |
|
| rules |
array<object> |
自愈子規則列表。 |
|
|
array<object> |
自愈子規則列表。 |
||
| incidents |
array<object> |
識別的故障列表。 |
|
|
object |
識別的故障列表。 |
||
| name |
string |
故障名稱。 |
Node.FaultNeedReboot.HOST |
| type |
string |
診斷類型。 |
system |
| repair_procedure |
array<object> |
修複流程。 |
|
|
array<object> |
修複流程。 |
||
| name |
string |
流程的名稱。 |
QuarantineGPU |
| intervention |
object |
配置人工參與流程。 |
|
| enable |
boolean |
是否開啟人工審批。 |
true |
| type |
string |
人工審批的類型。 |
label |
| inquiring_label |
object |
授權問詢的標籤配置。當進入該階段時,ACK 會為您的節點添加以下標籤(Label),等待您進行授權執行該階段動作。 |
|
| key |
string |
標籤 |
k8s.aliyun.com/incident |
| value |
string |
汙點 |
inquiring |
| approved_label |
object |
確認授權的 label 配置。當您為節點添加以下標籤(Label)時,即表示授權 ACK 執行該階段的操作。ACK 將在完成該階段操作後,自動移除該階段對應的授權問詢與確認授權的標籤(Label)。如您未及時添加以下標籤(Label)授權,ACK 將不會執行該階段動作和後續動作,節點可能停留在受損狀態。 |
|
| key |
string |
標籤 |
k8s.aliyun.com/incident |
| value |
string |
標籤 |
approved |
| config |
object |
流程的配置參數。 |
|
|
any |
流程的配置參數。 |
{ "drain_timeout": "30s" } |
樣本
正常返回樣本
JSON格式
{
"items": [
{
"name": "test",
"id": "r-xxxxx",
"resource_type": "nodepool",
"resource_sub_type": "ess",
"resource_ids": [
"npxxxxx"
],
"rules": [
{
"incidents": [
{
"name": "Node.FaultNeedReboot.HOST",
"type": "system\n"
}
],
"repair_procedure": [
{
"name": "QuarantineGPU",
"intervention": {
"enable": true,
"type": "label",
"inquiring_label": {
"key": "k8s.aliyun.com/incident",
"value": "inquiring"
},
"approved_label": {
"key": "k8s.aliyun.com/incident",
"value": "approved"
}
},
"config": {
"key": "{\n\"drain_timeout\": \"30s\" \n}"
}
}
]
}
]
}
]
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。