全部产品
Search
文档中心

云监控:DescribeEventRuleList - 查询事件报警规则列表

更新时间:Jan 23, 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. 未找到指定资源。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情