public class CreateAlertRuleRequest extends AbstractModel
header, skipSign| 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 List of annotations. 
 | 
String | 
getDuration()
Get Rule alert duration 
 | 
String | 
getExpr()
Get Alerting rule expression. 
 | 
String | 
getInstanceId()
Get TMP instance ID, such as “prom-abcd1234”. 
 | 
PrometheusRuleKV[] | 
getLabels()
Get List of tags 
 | 
String[] | 
getReceivers()
Get List of alert notification template IDs 
 | 
String | 
getRuleName()
Get Rule name 
 | 
Long | 
getRuleState()
Get Rule status code. 
 | 
String | 
getType()
Get Alerting rule template category 
 | 
void | 
setAnnotations(PrometheusRuleKV[] Annotations)
Set List of annotations. 
 | 
void | 
setDuration(String Duration)
Set Rule alert duration 
 | 
void | 
setExpr(String Expr)
Set Alerting rule expression. 
 | 
void | 
setInstanceId(String InstanceId)
Set TMP instance ID, such as “prom-abcd1234”. 
 | 
void | 
setLabels(PrometheusRuleKV[] Labels)
Set List of tags 
 | 
void | 
setReceivers(String[] Receivers)
Set List of alert notification template IDs 
 | 
void | 
setRuleName(String RuleName)
Set Rule name 
 | 
void | 
setRuleState(Long RuleState)
Set Rule status code. 
 | 
void | 
setType(String Type)
Set Alerting rule template category 
 | 
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 CreateAlertRuleRequest()
public CreateAlertRuleRequest(CreateAlertRuleRequest source)
public String getInstanceId()
public void setInstanceId(String InstanceId)
InstanceId - TMP instance ID, such as “prom-abcd1234”.public String getRuleName()
public void setRuleName(String RuleName)
RuleName - Rule namepublic String getExpr()
public void setExpr(String Expr)
Expr - Alerting rule expression. For more information, see Alerting Rule Descriptionpublic String[] getReceivers()
public void setReceivers(String[] Receivers)
Receivers - List of alert notification template IDspublic Long getRuleState()
public void setRuleState(Long RuleState)
RuleState - Rule status code. Valid values:
public String getDuration()
public void setDuration(String Duration)
Duration - Rule alert durationpublic PrometheusRuleKV[] getLabels()
public void setLabels(PrometheusRuleKV[] Labels)
Labels - List of tagspublic PrometheusRuleKV[] getAnnotations()
public void setAnnotations(PrometheusRuleKV[] Annotations)
Annotations - List of annotations.
Alert object and alert message are special fields of Prometheus Rule Annotations, which need to be passed in through `annotations` and correspond to `summary` and `description` keys respectively.public String getType()
public void setType(String Type)
Type - Alerting rule template categoryCopyright © 2025. All rights reserved.