云日志服务 LTS-查询SQL告警规则:响应示例

时间:2023-12-15 10:06:59

响应示例

状态码: 200

请求响应成功。

{
  "sql_alarm_rules" : [ {
    "sql_alarm_rule_name" : "string",
    "is_css_sql" : false,
    "sql_alarm_rule_id" : "string",
    "sql_alarm_rule_description" : "string",
    "sql_requests" : [ {
      "log_stream_id" : "string",
      "log_stream_name" : "string",
      "log_group_id" : "string",
      "log_group_name" : "string",
      "sql" : "string",
      "sql_request_title" : "string",
      "search_time_range" : 0,
      "search_time_range_unit" : "minute"
    } ],
    "frequency" : {
      "type" : "CRON",
      "cron_expr" : "string",
      "hour_of_day" : 0,
      "day_of_week" : 0,
      "fixed_rate" : 0,
      "fixed_rate_unit" : "minute"
    },
    "condition_expression" : "string",
    "topics" : [ {
      "name" : "string",
      "topic_urn" : "string",
      "display_name" : "string",
      "push_policy" : 0
    } ],
    "sql_alarm_level" : "Info",
    "sql_alarm_send" : true,
    "domain_id" : "string",
    "create_time" : 0,
    "update_time" : 0,
    "template_name" : "消息模板名称",
    "status" : "RUNNING",
    "trigger_condition_count" : "1",
    "trigger_condition_frequency" : "1",
    "whether_recovery_policy" : false,
    "recovery_policy" : "3",
    "notification_frequency" : 5,
    "alarm_action_rule_name" : ""
  } ]
}

状态码: 500

表明服务端能被请求访问到,但是服务内部出错。

{
  "error_code" : "LTS.2008",
  "error_msg" : "Find Alarm rule failed."
}
support.huaweicloud.com/api-lts/lts_api_0073.html