public class CreateAlertRuleRequest extends AbstractModel
Constructor and Description |
---|
CreateAlertRuleRequest() |
CreateAlertRuleRequest(CreateAlertRuleRequest 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 告警通知模板 ID 列表
|
String |
getRuleName()
Get 规则名称
|
Long |
getRuleState()
Get 规则状态码,取值如下:
2=RuleEnabled
3=RuleDisabled
|
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 告警通知模板 ID 列表
|
void |
setRuleName(String RuleName)
Set 规则名称
|
void |
setRuleState(Long RuleState)
Set 规则状态码,取值如下:
2=RuleEnabled
3=RuleDisabled
|
void |
setType(String Type)
Set 报警策略模板分类
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, toJsonString
public CreateAlertRuleRequest()
public CreateAlertRuleRequest(CreateAlertRuleRequest source)
public String getInstanceId()
public void setInstanceId(String InstanceId)
InstanceId
- Prometheus 实例 IDpublic String getRuleName()
public void setRuleName(String RuleName)
RuleName
- 规则名称public String getExpr()
public void setExpr(String Expr)
Expr
- 规则表达式public String[] getReceivers()
public void setReceivers(String[] Receivers)
Receivers
- 告警通知模板 ID 列表public Long getRuleState()
public void setRuleState(Long RuleState)
RuleState
- 规则状态码,取值如下:
public String getDuration()
public void setDuration(String Duration)
Duration
- 规则报警持续时间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 © 2021. All rights reserved.