public class PutCustomMetricRuleRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
String |
comparisonOperator
The operator that is used to compare the metric value with the threshold.
|
String |
contactGroups
The alert contact groups.
|
String |
effectiveInterval
The period of time during which the alert rule is effective.
|
String |
emailSubject
The subject of the alert notification email.
|
Integer |
evaluationCount
The consecutive number of times for which the metric value meets the alert condition before an alert is triggered.
|
String |
groupId
The ID of the application group to which the custom monitoring data belongs.
|
String |
level
The alert level.
|
String |
metricName
The metric name.
|
String |
period
The cycle that is used to aggregate custom monitoring data.
|
String |
resources
The custom monitoring data to which the alert rule applies.
|
String |
ruleId
The ID of the alert rule.
|
String |
ruleName
The name of the alert rule.
|
Integer |
silenceTime
The mute period during which new alert notifications are not sent even if the trigger conditions are met.
|
String |
statistics
The method used to calculate the metric value based on which alerts are triggered.
|
String |
threshold
The alert threshold.
|
String |
webhook
The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
|
| 构造器和说明 |
|---|
PutCustomMetricRuleRequest() |
@NameInMap(value="ComparisonOperator") public String comparisonOperator
The operator that is used to compare the metric value with the threshold. Valid values:
>==<=><!=This parameter is required.
example:=
@NameInMap(value="ContactGroups") public String contactGroups
The alert contact groups. Separate multiple alert contact groups with commas (,).
This parameter is required.
example:ECS_Group
@NameInMap(value="EffectiveInterval") public String effectiveInterval
The period of time during which the alert rule is effective. Valid values: 00:00 to 23:59.
example:00:00-23:59
@NameInMap(value="EmailSubject") public String emailSubject
The subject of the alert notification email.
@NameInMap(value="EvaluationCount") public Integer evaluationCount
The consecutive number of times for which the metric value meets the alert condition before an alert is triggered.
This parameter is required.
example:3
@NameInMap(value="GroupId") public String groupId
The ID of the application group to which the custom monitoring data belongs.
example:The value 0 indicates that the reported custom monitoring data does not belong to an application group.
7378****
@NameInMap(value="Level") public String level
The alert level. Valid values:
This parameter is required.
example:CRITICAL
@NameInMap(value="MetricName") public String metricName
The metric name.
For more information about how to obtain the metric name, see DescribeCustomMetricList.
This parameter is required.
example:cpu_total
@NameInMap(value="Period") public String period
The cycle that is used to aggregate custom monitoring data. Unit: seconds Set the value to an integral multiple of 60. The original reporting cycle of custom monitoring data is used by default.
example:300
@NameInMap(value="Resources") public String resources
The custom monitoring data to which the alert rule applies. The value includes the application group ID to which the custom monitoring data belongs and the dimension to which the metric belongs.
This parameter is required.
example:[{"groupId":7378****,"dimension":"instanceId=i-hp3543t5e4sudb3s****"}]
@NameInMap(value="RuleId") public String ruleId
The ID of the alert rule.
You can specify an existing ID to modify the corresponding alert rule or specify a new ID to create an alert rule.
This parameter is required.
example:MyRuleId1
@NameInMap(value="RuleName") public String ruleName
The name of the alert rule.
example:CpuUsage
@NameInMap(value="SilenceTime") public Integer silenceTime
The mute period during which new alert notifications are not sent even if the trigger conditions are met. Unit: seconds. Default value: 86400, which is equivalent to one day.
example:Only one alert notification is sent during each mute period even if the metric value exceeds the alert threshold several times.
86400
@NameInMap(value="Statistics") public String statistics
The method used to calculate the metric value based on which alerts are triggered.
This parameter is required.
example:Average
@NameInMap(value="Threshold") public String threshold
The alert threshold.
This parameter is required.
example:90
@NameInMap(value="Webhook") public String webhook
The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
example:public static PutCustomMetricRuleRequest build(Map<String,?> map) throws Exception
Exceptionpublic PutCustomMetricRuleRequest setComparisonOperator(String comparisonOperator)
public String getComparisonOperator()
public PutCustomMetricRuleRequest setContactGroups(String contactGroups)
public String getContactGroups()
public PutCustomMetricRuleRequest setEffectiveInterval(String effectiveInterval)
public String getEffectiveInterval()
public PutCustomMetricRuleRequest setEmailSubject(String emailSubject)
public String getEmailSubject()
public PutCustomMetricRuleRequest setEvaluationCount(Integer evaluationCount)
public Integer getEvaluationCount()
public PutCustomMetricRuleRequest setGroupId(String groupId)
public String getGroupId()
public PutCustomMetricRuleRequest setLevel(String level)
public String getLevel()
public PutCustomMetricRuleRequest setMetricName(String metricName)
public String getMetricName()
public PutCustomMetricRuleRequest setPeriod(String period)
public String getPeriod()
public PutCustomMetricRuleRequest setResources(String resources)
public String getResources()
public PutCustomMetricRuleRequest setRuleId(String ruleId)
public String getRuleId()
public PutCustomMetricRuleRequest setRuleName(String ruleName)
public String getRuleName()
public PutCustomMetricRuleRequest setSilenceTime(Integer silenceTime)
public Integer getSilenceTime()
public PutCustomMetricRuleRequest setStatistics(String statistics)
public String getStatistics()
public PutCustomMetricRuleRequest setThreshold(String threshold)
public String getThreshold()
public PutCustomMetricRuleRequest setWebhook(String webhook)
public String getWebhook()
Copyright © 2026. All rights reserved.