调用DescribeEventRuleAttribute接口查询指定事件报警规则的详情。
接口说明
本文将提供一个示例,查询事件报警规则testRule的详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
 调试
        
            调试
        
    
授权信息
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
| cms:DescribeEventRuleAttribute | get | *全部资源 
 | 无 | 无 | 
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
| RuleName | string | 是 | 事件报警规则名称。 关于如何获取事件报警规则名称,请参见 DescribeEventRuleList 。 | testRule | 
| SilenceTime | string | 否 | 通道沉默周期。 单位:秒,默认值:86400(1 天)。 说明 
 当监控数据持续超过报警规则阈值时,每个沉默周期内只发送一次报警通知。 | 86400 | 
关于公共请求参数的详情,请参见公共参数。
返回参数
| 名称 | 类型 | 描述 | 示例值 | 
| object | |||
| Code | string | 状态码。 说明 
 200 表示成功。 | 200 | 
| Message | string | 错误信息。 | The alert does not exist. | 
| RequestId | string | 请求 ID。 | 9AA3F210-C03D-4C86-8DB6-21C84FF692A1 | 
| Success | boolean | 操作是否成功。取值: 
 | true | 
| Result | object | 事件报警规则详情。 | |
| EventType | string | 事件类型。取值: 
 | SYSTEM | 
| GroupId | string | 应用分组 ID。 | 3607**** | 
| Name | string | 事件报警规则的名称。 | test_DefaultEventRule_7378**** | 
| Description | string | 事件报警规则的描述信息。 | Default group event rule. | 
| State | string | 事件报警规则的状态。取值: 
 | ENABLED | 
| EventPattern | object | 事件模式。用于描述事件的触发条件。 | |
| Product | string | 云产品名称。 | CloudMonitor | 
| LevelList | object | ||
| LevelList | array | 事件报警规则的级别的列表。 | |
| string | 事件报警规则的级别。取值: 
 | ["CRITICAL","WARN"] | |
| StatusList | object | ||
| StatusList | array | 事件报警规则的状态的列表。 | |
| string | 事件状态。 | Running | |
| NameList | object | ||
| NameList | array | 事件报警规则的名称的列表。 | |
| string | 事件名称。 | Agent_Status_Running | |
| EventTypeList | object | ||
| EventTypeList | array | 事件报警规则的类型列表。 | |
| string | 事件报警规则的类型。 
 | * | |
| SQLFilter | string | 按照 SQL 过滤日志。如果符合条件,则触发报警。 | ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222 | 
| KeywordFilterObj | object | 过滤关键词。 | |
| Keywords | object | ||
| keyword | array | 事件匹配的关键字列表。 | |
| string | 关键字。 | VMException | |
| Relation | string | 多个关键字的条件。取值: 
 | OR | 
示例
正常返回示例
JSON格式
{
  "Code": "200",
  "Message": "The alert does not exist.",
  "RequestId": "9AA3F210-C03D-4C86-8DB6-21C84FF692A1",
  "Success": true,
  "Result": {
    "EventType": "SYSTEM",
    "GroupId": "3607****",
    "Name": "test_DefaultEventRule_7378****",
    "Description": "Default group event rule.",
    "State": "ENABLED",
    "EventPattern": {
      "Product": "CloudMonitor",
      "LevelList": {
        "LevelList": [
          "[\"CRITICAL\",\"WARN\"]    "
        ]
      },
      "StatusList": {
        "StatusList": [
          "Running"
        ]
      },
      "NameList": {
        "NameList": [
          "Agent_Status_Running"
        ]
      },
      "EventTypeList": {
        "EventTypeList": [
          "*"
        ]
      },
      "SQLFilter": "ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222",
      "KeywordFilterObj": {
        "Keywords": {
          "keyword": [
            "VMException"
          ]
        },
        "Relation": "OR"
      }
    }
  }
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 400 | InvalidParameterValue | Illegal parameters. | 参数错误。 | 
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. | |
| 404 | %s | %s | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。