public class PrometheusAlertGroupRuleSet extends AbstractModel
header, skipSign| Constructor and Description | 
|---|
| PrometheusAlertGroupRuleSet() | 
| PrometheusAlertGroupRuleSet(PrometheusAlertGroupRuleSet 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。
注意:此字段可能返回 null,表示取不到有效值。 | 
| String | getDuration()Get 规则报警持续时间
注意:此字段可能返回 null,表示取不到有效值。 | 
| String | getExpr()Get 规则表达式,可参考告警规则说明
注意:此字段可能返回 null,表示取不到有效值。 | 
| PrometheusRuleKV[] | getLabels()Get 标签列表
注意:此字段可能返回 null,表示取不到有效值。 | 
| String | getRuleName()Get 告警规则名称,同一告警分组下不允许重名
注意:此字段可能返回 null,表示取不到有效值。 | 
| Long | getState()Get 告警规则状态:
2-启用
3-禁用
为空默认启用
注意:此字段可能返回 null,表示取不到有效值。 | 
| void | setAnnotations(PrometheusRuleKV[] Annotations)Set 注释列表
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
注意:此字段可能返回 null,表示取不到有效值。 | 
| void | setDuration(String Duration)Set 规则报警持续时间
注意:此字段可能返回 null,表示取不到有效值。 | 
| void | setExpr(String Expr)Set 规则表达式,可参考告警规则说明
注意:此字段可能返回 null,表示取不到有效值。 | 
| void | setLabels(PrometheusRuleKV[] Labels)Set 标签列表
注意:此字段可能返回 null,表示取不到有效值。 | 
| void | setRuleName(String RuleName)Set 告警规则名称,同一告警分组下不允许重名
注意:此字段可能返回 null,表示取不到有效值。 | 
| void | setState(Long State)Set 告警规则状态:
2-启用
3-禁用
为空默认启用
注意:此字段可能返回 null,表示取不到有效值。 | 
| 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 PrometheusAlertGroupRuleSet()
public PrometheusAlertGroupRuleSet(PrometheusAlertGroupRuleSet source)
public String getRuleName()
public void setRuleName(String RuleName)
RuleName - 告警规则名称,同一告警分组下不允许重名
注意:此字段可能返回 null,表示取不到有效值。public PrometheusRuleKV[] getLabels()
public void setLabels(PrometheusRuleKV[] Labels)
Labels - 标签列表
注意:此字段可能返回 null,表示取不到有效值。public PrometheusRuleKV[] getAnnotations()
public void setAnnotations(PrometheusRuleKV[] Annotations)
Annotations - 注释列表
告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
注意:此字段可能返回 null,表示取不到有效值。public String getDuration()
public void setDuration(String Duration)
Duration - 规则报警持续时间
注意:此字段可能返回 null,表示取不到有效值。public String getExpr()
public void setExpr(String Expr)
Expr - 规则表达式,可参考告警规则说明
注意:此字段可能返回 null,表示取不到有效值。public Long getState()
public void setState(Long State)
State - 告警规则状态:
2-启用
3-禁用
为空默认启用
注意:此字段可能返回 null,表示取不到有效值。Copyright © 2025. All rights reserved.