public class PutResourceMetricRuleShrinkRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
String |
compositeExpressionShrink
The trigger conditions for multiple metrics.
|
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.
|
PutResourceMetricRuleShrinkRequest.PutResourceMetricRuleShrinkRequestEscalations |
escalations |
String |
interval
The interval at which alerts are triggered based on the alert rule.
|
List<PutResourceMetricRuleShrinkRequest.PutResourceMetricRuleShrinkRequestLabels> |
labels
If the metric meets the specified condition in the alert rule and CloudMonitor sends an alert notification, the tag is also written to the metric and displayed in the alert notification.
|
String |
metricName
The metric name.
|
String |
namespace
The namespace of the cloud service.
|
String |
noDataPolicy
The method that is used to handle alerts when no monitoring data is found.
|
String |
noEffectiveInterval
The period of time during which the alert rule is ineffective.
|
String |
period
The statistical period of the metric.
|
String |
prometheusShrink
Prometheus alerts.
|
String |
resources
The resource information.
|
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 |
webhook
The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
|
| 构造器和说明 |
|---|
PutResourceMetricRuleShrinkRequest() |
@NameInMap(value="Escalations") public PutResourceMetricRuleShrinkRequest.PutResourceMetricRuleShrinkRequestEscalations escalations
@NameInMap(value="CompositeExpression") public String compositeExpressionShrink
The trigger conditions for multiple metrics.
The trigger conditions for a single metric and multiple metrics are mutually exclusive. You cannot specify trigger conditions for a single metric and multiple metrics at the same time.
@NameInMap(value="ContactGroups") public String contactGroups
The alert contact groups. Alert notifications are sent to the alert contacts in the alert contact group.
An alert contact group can contain one or more alert contacts. For information about how to create alert contacts and alert contact groups, see PutContact and PutContactGroup.
This parameter is required.
example:ECS_Group
@NameInMap(value="EffectiveInterval") public String effectiveInterval
The period of time during which the alert rule is effective.
example:00:00-23:59
@NameInMap(value="EmailSubject") public String emailSubject
The subject of the alert notification email.
@NameInMap(value="Interval") public String interval
The interval at which alerts are triggered based on the alert rule. Unit: seconds.
example:For more information about how to query the statistical periods of metrics, see Appendix 1: Metrics.
60
@NameInMap(value="Labels") public List<PutResourceMetricRuleShrinkRequest.PutResourceMetricRuleShrinkRequestLabels> labels
If the metric meets the specified condition in the alert rule and CloudMonitor sends an alert notification, the tag is also written to the metric and displayed in the alert notification.
This parameter is equivalent to the Label parameter of Prometheus alerts.
@NameInMap(value="MetricName") public String metricName
The metric name. For more information about how to query metric names, see Appendix 1: Metrics.
If you create a Prometheus alert rule for Hybrid Cloud Monitoring, you must set this parameter to the name of the namespace. For more information about how to query the names of namespaces, see DescribeHybridMonitorNamespaceList.
This parameter is required.
example:cpu_total
@NameInMap(value="Namespace") public String namespace
The namespace of the cloud service. For more information about how to query the namespaces of cloud services, see Appendix 1: Metrics.
If you create a Prometheus alert rule for Hybrid Cloud Monitoring, you must set this parameter to
acs_prometheus.
This parameter is required.
example:acs_ecs_dashboard
@NameInMap(value="NoDataPolicy") public String noDataPolicy
The method that is used to handle alerts when no monitoring data is found. Valid value:
KEEP_LAST_STATE
@NameInMap(value="NoEffectiveInterval") public String noEffectiveInterval
The period of time during which the alert rule is ineffective.
example:00:00-06:00
@NameInMap(value="Period") public String period
The statistical period of the metric. Unit: seconds. The default value is the interval at which the monitoring data of the metric is collected.
example:For more information about how to query the statistical periods of metrics, see Appendix 1: Metrics.
60
@NameInMap(value="Prometheus") public String prometheusShrink
Prometheus alerts.
This parameter is required only if you create a Prometheus alert rule for Hybrid Cloud Monitoring.
@NameInMap(value="Resources") public String resources
The resource information. Examples: [{"instanceId":"i-uf6j91r34rnwawoo****"}] and [{"userId":"100931896542****"}].
For more information about the supported dimensions that are used to query resources, see Appendix 1: Metrics.
example:[{"instanceId":"i-uf6j91r34rnwawoo****"}]
@NameInMap(value="RuleId") public String ruleId
The ID of the alert rule.
You can specify a new ID or the ID of an existing alert rule. For more information about how to query the IDs of alert rules, see DescribeMetricRuleList.
If you specify a new ID, a threshold-triggered alert rule is created.
This parameter is required.
example:a151cd6023eacee2f0978e03863cc1697c89508****
@NameInMap(value="RuleName") public String ruleName
The name of the alert rule.
You can specify a new name or the name of an existing alert rule. For more information about how to query the names of alert rules, see DescribeMetricRuleList.
If you specify a new name, a threshold-triggered alert rule is created.
This parameter is required.
example:test123
@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.
example:If an alert is not cleared after the mute period ends, CloudMonitor resends an alert notification.
86400
@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 PutResourceMetricRuleShrinkRequest build(Map<String,?> map) throws Exception
Exceptionpublic PutResourceMetricRuleShrinkRequest setEscalations(PutResourceMetricRuleShrinkRequest.PutResourceMetricRuleShrinkRequestEscalations escalations)
public PutResourceMetricRuleShrinkRequest.PutResourceMetricRuleShrinkRequestEscalations getEscalations()
public PutResourceMetricRuleShrinkRequest setCompositeExpressionShrink(String compositeExpressionShrink)
public String getCompositeExpressionShrink()
public PutResourceMetricRuleShrinkRequest setContactGroups(String contactGroups)
public String getContactGroups()
public PutResourceMetricRuleShrinkRequest setEffectiveInterval(String effectiveInterval)
public String getEffectiveInterval()
public PutResourceMetricRuleShrinkRequest setEmailSubject(String emailSubject)
public String getEmailSubject()
public PutResourceMetricRuleShrinkRequest setInterval(String interval)
public String getInterval()
public PutResourceMetricRuleShrinkRequest setLabels(List<PutResourceMetricRuleShrinkRequest.PutResourceMetricRuleShrinkRequestLabels> labels)
public List<PutResourceMetricRuleShrinkRequest.PutResourceMetricRuleShrinkRequestLabels> getLabels()
public PutResourceMetricRuleShrinkRequest setMetricName(String metricName)
public String getMetricName()
public PutResourceMetricRuleShrinkRequest setNamespace(String namespace)
public String getNamespace()
public PutResourceMetricRuleShrinkRequest setNoDataPolicy(String noDataPolicy)
public String getNoDataPolicy()
public PutResourceMetricRuleShrinkRequest setNoEffectiveInterval(String noEffectiveInterval)
public String getNoEffectiveInterval()
public PutResourceMetricRuleShrinkRequest setPeriod(String period)
public String getPeriod()
public PutResourceMetricRuleShrinkRequest setPrometheusShrink(String prometheusShrink)
public String getPrometheusShrink()
public PutResourceMetricRuleShrinkRequest setResources(String resources)
public String getResources()
public PutResourceMetricRuleShrinkRequest setRuleId(String ruleId)
public String getRuleId()
public PutResourceMetricRuleShrinkRequest setRuleName(String ruleName)
public String getRuleName()
public PutResourceMetricRuleShrinkRequest setSilenceTime(Integer silenceTime)
public Integer getSilenceTime()
public PutResourceMetricRuleShrinkRequest setWebhook(String webhook)
public String getWebhook()
Copyright © 2026. All rights reserved.