調用DescribeEventRuleList介面查詢事件警示規則列表。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cms:DescribeEventRuleList |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| NamePrefix |
string |
否 |
事件警示規則首碼。 |
test |
| PageNumber |
string |
否 |
頁碼。 起始值:1。預設值:1。 |
1 |
| PageSize |
string |
否 |
分頁時每頁顯示的資料行數。 起始值:1。預設值:10。 |
10 |
| GroupId |
string |
否 |
應用分組 ID。 |
7378**** |
| IsEnable |
boolean |
否 |
啟用或禁用事件警示規則。取值: true(預設值):啟用。 false:禁用。 |
true |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
事件警示規則列表。 |
||
| Code |
string |
狀態代碼。 說明
200 表示成功。 |
200 |
| Message |
string |
錯誤資訊。 |
User not authorized to operate on the specified resource. |
| RequestId |
string |
請求 ID。 |
D0E6D82B-16B5-422A-8136-EE5BDC01E415 |
| Total |
integer |
總記錄條數。 |
21 |
| Success |
boolean |
操作是否成功。取值:
|
true |
| EventRules |
object |
||
| EventRule |
array<object> |
事件警示規則。 |
|
|
array<object> |
事件警示規則。 |
||
| EventType |
string |
事件警示類型。取值:
|
SYSTEM |
| Description |
string |
事件警示規則的描述資訊。 |
Default group event rule. |
| GroupId |
string |
應用分組 ID。 |
7378**** |
| Name |
string |
事件警示規則名稱。 |
test_DefaultEventRule_7378**** |
| State |
string |
事件警示規則狀態。取值:
|
ENABLED |
| EventPattern |
object |
||
| EventPattern |
array<object> |
事件警示規則的模式。 |
|
|
array<object> |
事件警示規則的模式。 |
||
| Product |
string |
雲端服務名稱的縮寫。 |
CloudMonitor |
| LevelList |
object |
||
| LevelList |
array |
事件的等級列表。 |
|
|
string |
事件的等級。取值:
|
CRITICAL |
|
| EventTypeList |
object |
||
| EventTypeList |
array |
事件警示規則的類型列表。 |
|
|
string |
事件警示規則的類型。
|
* |
|
| NameList |
object |
||
| NameList |
array |
事件名稱列表。 |
|
|
string |
事件名稱列表。 |
["Agent_Status_Stopped"] |
|
| CustomFilters |
string |
自訂過濾條件。 |
ECS123 |
| KeywordFilter |
object |
過濾關鍵詞。 |
|
| Keywords |
object |
||
| Keywords |
array |
事件匹配的關鍵字列表。 |
|
|
string |
關鍵字。 |
VMException |
|
| Relation |
string |
多個關鍵字的條件。取值:
|
OR |
| SQLFilter |
string |
按照 SQL 過濾日誌。如果符合條件,則觸發警示。 |
ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222 |
| SilenceTime |
integer |
通道沉默周期。 |
86400 |
樣本
正常返回樣本
JSON格式
{
"Code": "200",
"Message": "User not authorized to operate on the specified resource.",
"RequestId": "D0E6D82B-16B5-422A-8136-EE5BDC01E415",
"Total": 21,
"Success": true,
"EventRules": {
"EventRule": [
{
"EventType": "SYSTEM",
"Description": "Default group event rule.",
"GroupId": "7378****",
"Name": "test_DefaultEventRule_7378****",
"State": "ENABLED",
"EventPattern": {
"EventPattern": [
{
"Product": "CloudMonitor",
"LevelList": {
"LevelList": [
"CRITICAL"
]
},
"EventTypeList": {
"EventTypeList": [
"*"
]
},
"NameList": {
"NameList": [
"[\"Agent_Status_Stopped\"]"
]
},
"CustomFilters": "ECS123",
"KeywordFilter": {
"Keywords": {
"Keywords": [
"VMException"
]
},
"Relation": "OR"
},
"SQLFilter": "ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222"
}
]
},
"SilenceTime": 86400
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidParameterValue | Illegal parameters. | 參數錯誤。 |
| 500 | %s | %s | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. | |
| 404 | ResourceNotFound | The specified resource is not found. | 未找到指定資源。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。