全部產品
Search
文件中心

Cloud Monitor:DescribeEventRuleList - 查詢事件警示規則列表

更新時間:Mar 21, 2026

調用DescribeEventRuleList介面查詢事件警示規則列表。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

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:成功。

  • false:失敗。

true

EventRules

object

EventRule

array<object>

事件警示規則。

array<object>

事件警示規則。

EventType

string

事件警示類型。取值:

  • SYSTEM:系統事件。

  • CUSTOM:自訂事件。

SYSTEM

Description

string

事件警示規則的描述資訊。

Default group event rule.

GroupId

string

應用分組 ID。

7378****

Name

string

事件警示規則名稱。

test_DefaultEventRule_7378****

State

string

事件警示規則狀態。取值:

  • ENABLED:啟用。

  • DISABLED:禁用。

ENABLED

EventPattern

object

EventPattern

array<object>

事件警示規則的模式。

array<object>

事件警示規則的模式。

Product

string

雲端服務名稱的縮寫。

CloudMonitor

LevelList

object

LevelList

array

事件的等級列表。

string

事件的等級。取值:

  • CRITICAL:嚴重。

  • WARN:警告。

  • INFO:資訊。

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: 多個關鍵字之前是或的關係。

  • NOT:不包含關鍵字。表示匹配非關鍵字列表中的所有事件。

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. 未找到指定資源。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情