调用DescribeEventRuleList接口查询事件报警规则列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
NamePrefix | string | 否 | 事件报警规则前缀。 | test |
PageNumber | string | 否 | 页码。 起始值:1。默认值:1。 | 1 |
PageSize | string | 否 | 分页时每页显示的数据行数。 起始值:1。默认值:10。 | 10 |
GroupId | string | 否 | 应用分组 ID。 | 7378**** |
IsEnable | boolean | 否 | 启用或禁用事件报警规则。取值: true(默认值):启用。 false:禁用。 | true |
返回参数
示例
正常返回示例
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. | 参数错误。 |
403 | AccessForbidden | User not authorized to operate on the specified resource. | - |
404 | ResourceNotFound | The specified resource is not found. | 未找到指定资源。 |
500 | %s | %s | - |
500 | InternalError | The request processing has failed due to some unknown error. | - |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2023-09-19 | OpenAPI 错误码发生变更、OpenAPI 入参发生变更 | 查看变更详情 |
2021-12-03 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |