Class CreateAlertRuleRequest
- java.lang.Object
-
- com.tencentcloudapi.common.AbstractModel
-
- com.tencentcloudapi.monitor.v20180724.models.CreateAlertRuleRequest
-
public class CreateAlertRuleRequest extends AbstractModel
-
-
Field Summary
-
Fields inherited from class com.tencentcloudapi.common.AbstractModel
header, skipSign
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrometheusRuleKV[]getAnnotations()Get 注释列表。 告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。StringgetDuration()Get 规则报警持续时间StringgetExpr()Get 规则表达式,可参考告警规则说明StringgetInstanceId()Get Prometheus 实例 ID,例如:prom-abcd1234PrometheusRuleKV[]getLabels()Get 标签列表String[]getReceivers()Get 告警通知模板 ID 列表StringgetRuleName()Get 规则名称LonggetRuleState()Get 规则状态码,取值如下: 2=RuleEnabled 3=RuleDisabledStringgetType()Get 报警策略模板分类voidsetAnnotations(PrometheusRuleKV[] Annotations)Set 注释列表。 告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。voidsetDuration(String Duration)Set 规则报警持续时间voidsetExpr(String Expr)Set 规则表达式,可参考告警规则说明voidsetInstanceId(String InstanceId)Set Prometheus 实例 ID,例如:prom-abcd1234voidsetLabels(PrometheusRuleKV[] Labels)Set 标签列表voidsetReceivers(String[] Receivers)Set 告警通知模板 ID 列表voidsetRuleName(String RuleName)Set 规则名称voidsetRuleState(Long RuleState)Set 规则状态码,取值如下: 2=RuleEnabled 3=RuleDisabledvoidsetType(String Type)Set 报警策略模板分类voidtoMap(HashMap<String,String> map, String prefix)Internal implementation, normal users should not use it.-
Methods inherited from class com.tencentcloudapi.common.AbstractModel
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
-
-
-
-
Constructor Detail
-
CreateAlertRuleRequest
public CreateAlertRuleRequest()
-
CreateAlertRuleRequest
public 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.
-
-
Method Detail
-
getInstanceId
public String getInstanceId()
Get Prometheus 实例 ID,例如:prom-abcd1234- Returns:
- InstanceId Prometheus 实例 ID,例如:prom-abcd1234
-
setInstanceId
public void setInstanceId(String InstanceId)
Set Prometheus 实例 ID,例如:prom-abcd1234- Parameters:
InstanceId- Prometheus 实例 ID,例如:prom-abcd1234
-
getRuleName
public String getRuleName()
Get 规则名称- Returns:
- RuleName 规则名称
-
setRuleName
public void setRuleName(String RuleName)
Set 规则名称- Parameters:
RuleName- 规则名称
-
getReceivers
public String[] getReceivers()
Get 告警通知模板 ID 列表- Returns:
- Receivers 告警通知模板 ID 列表
-
setReceivers
public void setReceivers(String[] Receivers)
Set 告警通知模板 ID 列表- Parameters:
Receivers- 告警通知模板 ID 列表
-
getRuleState
public Long getRuleState()
Get 规则状态码,取值如下:- 2=RuleEnabled
- 3=RuleDisabled
- Returns:
- RuleState 规则状态码,取值如下:
- 2=RuleEnabled
- 3=RuleDisabled
-
setRuleState
public void setRuleState(Long RuleState)
Set 规则状态码,取值如下:- 2=RuleEnabled
- 3=RuleDisabled
- Parameters:
RuleState- 规则状态码,取值如下:- 2=RuleEnabled
- 3=RuleDisabled
-
getDuration
public String getDuration()
Get 规则报警持续时间- Returns:
- Duration 规则报警持续时间
-
setDuration
public void setDuration(String Duration)
Set 规则报警持续时间- Parameters:
Duration- 规则报警持续时间
-
getLabels
public PrometheusRuleKV[] getLabels()
Get 标签列表- Returns:
- Labels 标签列表
-
setLabels
public void setLabels(PrometheusRuleKV[] Labels)
Set 标签列表- Parameters:
Labels- 标签列表
-
getAnnotations
public PrometheusRuleKV[] getAnnotations()
Get 注释列表。 告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。- Returns:
- Annotations 注释列表。 告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
-
setAnnotations
public void setAnnotations(PrometheusRuleKV[] Annotations)
Set 注释列表。 告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。- Parameters:
Annotations- 注释列表。 告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description。
-
getType
public String getType()
Get 报警策略模板分类- Returns:
- Type 报警策略模板分类
-
setType
public void setType(String Type)
Set 报警策略模板分类- Parameters:
Type- 报警策略模板分类
-
-