public class UpdateAlertRuleRequest extends AbstractModel
header, skipSign| Constructor and Description | 
|---|
| UpdateAlertRuleRequest() | 
| UpdateAlertRuleRequest(UpdateAlertRuleRequest source)NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
       and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | 
| Modifier and Type | Method and Description | 
|---|---|
| PrometheusRuleKV[] | getAnnotations()Get 告警规则注释列表。
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。 | 
| String | getDuration()Get 告警规则持续时间 | 
| String | getExpr()Get 告警规则表达式 | 
| String | getInstanceId()Get Prometheus 实例 ID | 
| PrometheusRuleKV[] | getLabels()Get 告警规则标签列表 | 
| String[] | getReceivers()Get 告警规则接收组列表(当前规则绑定的接收组列表可通过 DescribeAlertRules 接口获取;用户已有的接收组列表可通过 DescribeAlarmNotices 接口获取) | 
| String | getRuleId()Get Prometheus 告警规则 ID | 
| String | getRuleName()Get 告警规则名称 | 
| Long | getRuleState()Get 规则状态码,取值如下:
1=RuleDeleted
2=RuleEnabled
3=RuleDisabled
默认状态码为 2 启用。 | 
| String | getType()Get 告警策略模板分类(自定义,可不填) | 
| void | setAnnotations(PrometheusRuleKV[] Annotations)Set 告警规则注释列表。
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。 | 
| void | setDuration(String Duration)Set 告警规则持续时间 | 
| void | setExpr(String Expr)Set 告警规则表达式 | 
| void | setInstanceId(String InstanceId)Set Prometheus 实例 ID | 
| void | setLabels(PrometheusRuleKV[] Labels)Set 告警规则标签列表 | 
| void | setReceivers(String[] Receivers)Set 告警规则接收组列表(当前规则绑定的接收组列表可通过 DescribeAlertRules 接口获取;用户已有的接收组列表可通过 DescribeAlarmNotices 接口获取) | 
| void | setRuleId(String RuleId)Set Prometheus 告警规则 ID | 
| void | setRuleName(String RuleName)Set 告警规则名称 | 
| void | setRuleState(Long RuleState)Set 规则状态码,取值如下:
1=RuleDeleted
2=RuleEnabled
3=RuleDisabled
默认状态码为 2 启用。 | 
| void | setType(String Type)Set 告警策略模板分类(自定义,可不填) | 
| void | toMap(HashMap<String,String> map,
     String prefix)Internal implementation, normal users should not use it. | 
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonStringpublic UpdateAlertRuleRequest()
public UpdateAlertRuleRequest(UpdateAlertRuleRequest source)
public String getRuleId()
public void setRuleId(String RuleId)
RuleId - Prometheus 告警规则 IDpublic String getInstanceId()
public void setInstanceId(String InstanceId)
InstanceId - Prometheus 实例 IDpublic Long getRuleState()
public void setRuleState(Long RuleState)
RuleState - 规则状态码,取值如下:
public String getRuleName()
public void setRuleName(String RuleName)
RuleName - 告警规则名称public String getExpr()
public void setExpr(String Expr)
Expr - 告警规则表达式public String getDuration()
public void setDuration(String Duration)
Duration - 告警规则持续时间public String[] getReceivers()
public void setReceivers(String[] Receivers)
Receivers - 告警规则接收组列表(当前规则绑定的接收组列表可通过 DescribeAlertRules 接口获取;用户已有的接收组列表可通过 DescribeAlarmNotices 接口获取)public PrometheusRuleKV[] getLabels()
public void setLabels(PrometheusRuleKV[] Labels)
Labels - 告警规则标签列表public PrometheusRuleKV[] getAnnotations()
public void setAnnotations(PrometheusRuleKV[] Annotations)
Annotations - 告警规则注释列表。
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。public String getType()
public void setType(String Type)
Type - 告警策略模板分类(自定义,可不填)Copyright © 2025. All rights reserved.