public class PutResourceMetricRuleRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
PutResourceMetricRuleRequest.PutResourceMetricRuleRequestCompositeExpression |
compositeExpression
The trigger conditions for multiple metrics.
|
String |
contactGroups
The alert contact group.
|
String |
effectiveInterval
The time period during which the alert rule is effective.
|
String |
emailSubject
The subject of the alert notification email.
|
PutResourceMetricRuleRequest.PutResourceMetricRuleRequestEscalations |
escalations |
String |
interval
The interval at which the alert is triggered.
|
List<PutResourceMetricRuleRequest.PutResourceMetricRuleRequestLabels> |
labels
The tags.
|
String |
metricName
The name of the metric.
|
String |
namespace
The namespace of the cloud service.
|
String |
noDataPolicy
The processing method of alerts when no monitoring data is found.
|
String |
noEffectiveInterval
The time period during which the alert rule is ineffective.
|
String |
period
The statistical period of the metric.
|
PutResourceMetricRuleRequest.PutResourceMetricRuleRequestPrometheus |
prometheus
The Prometheus alert rule.
|
String |
resources
The information about the resource.
|
String |
ruleId
The ID of the alert rule.
|
String |
ruleName
The name of the alert rule.
|
Integer |
silenceTime
The mute period during which new alerts 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.
|
| 构造器和说明 |
|---|
PutResourceMetricRuleRequest() |
@NameInMap(value="Escalations") public PutResourceMetricRuleRequest.PutResourceMetricRuleRequestEscalations escalations
@NameInMap(value="CompositeExpression") public PutResourceMetricRuleRequest.PutResourceMetricRuleRequestCompositeExpression compositeExpression
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 group. The alert notifications are sent to the contacts that belong to 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](~~114923~~) and [PutContactGroup](~~114929~~).
@NameInMap(value="EffectiveInterval") public String effectiveInterval
The time period during which the alert rule is effective.
@NameInMap(value="EmailSubject") public String emailSubject
The subject of the alert notification email.
@NameInMap(value="Interval") public String interval
The interval at which the alert is triggered. Unit: seconds.
> For information about how to query the statistical period of a metric, see [Appendix 1: Metrics](~~163515~~).
@NameInMap(value="Labels") public List<PutResourceMetricRuleRequest.PutResourceMetricRuleRequestLabels> labels
The tags.
@NameInMap(value="MetricName") public String metricName
The name of the metric. For information about how to query the name of a metric, see [Appendix 1: Metrics](~~163515~~).
> If you create a Prometheus alert rule for Hybrid Cloud Monitoring, you must set this parameter to the name of the namespace. For information about how to obtain the name of a namespace, see [DescribeHybridMonitorNamespaceList](~~428880~~).
@NameInMap(value="Namespace") public String namespace
The namespace of the cloud service. For information about how to query the namespace of a cloud service, see [Appendix 1: Metrics](~~163515~~).
> If you create a Prometheus alert rule for Hybrid Cloud Monitoring, you must set this parameter to `acs_prometheus`.
@NameInMap(value="NoDataPolicy") public String noDataPolicy
The processing method of alerts when no monitoring data is found. Valid values:
* KEEP_LAST_STATE (default value): No operation is performed.
* INSUFFICIENT_DATA: An alert whose content is "Insufficient data" is triggered.
* OK: The status is considered normal.
@NameInMap(value="NoEffectiveInterval") public String noEffectiveInterval
The time period during which the alert rule is ineffective.
@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.
> For information about how to query the statistical period of a metric, see [Appendix 1: Metrics](~~163515~~).
@NameInMap(value="Prometheus") public PutResourceMetricRuleRequest.PutResourceMetricRuleRequestPrometheus prometheus
The Prometheus alert rule.
> This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.
@NameInMap(value="Resources") public String resources
The information about the resource. Examples: `[{"instanceId":"i-uf6j91r34rnwawoo****"}]` and `[{"userId":"100931896542****"}]`.
For information about the supported dimensions that are used to query resources, see [Appendix 1: Metrics](~~163515~~).
@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 information about how to query the ID of an alert rule, see [DescribeMetricRuleList](~~114941~~).
> If you specify a new ID, a threshold-triggered alert rule is created.
@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 information about how to query the name of an alert rule, see [DescribeMetricRuleList](~~114941~~).
> If you specify a new name, a threshold-triggered alert rule is created.
@NameInMap(value="SilenceTime") public Integer silenceTime
The mute period during which new alerts are not sent even if the trigger conditions are met. Unit: seconds. Default value: 86400.
> If an alert is not cleared within the mute period, a new alert notification is sent when the mute period ends.
@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.
public static PutResourceMetricRuleRequest build(Map<String,?> map) throws Exception
Exceptionpublic PutResourceMetricRuleRequest setEscalations(PutResourceMetricRuleRequest.PutResourceMetricRuleRequestEscalations escalations)
public PutResourceMetricRuleRequest.PutResourceMetricRuleRequestEscalations getEscalations()
public PutResourceMetricRuleRequest setCompositeExpression(PutResourceMetricRuleRequest.PutResourceMetricRuleRequestCompositeExpression compositeExpression)
public PutResourceMetricRuleRequest.PutResourceMetricRuleRequestCompositeExpression getCompositeExpression()
public PutResourceMetricRuleRequest setContactGroups(String contactGroups)
public String getContactGroups()
public PutResourceMetricRuleRequest setEffectiveInterval(String effectiveInterval)
public String getEffectiveInterval()
public PutResourceMetricRuleRequest setEmailSubject(String emailSubject)
public String getEmailSubject()
public PutResourceMetricRuleRequest setInterval(String interval)
public String getInterval()
public PutResourceMetricRuleRequest setLabels(List<PutResourceMetricRuleRequest.PutResourceMetricRuleRequestLabels> labels)
public List<PutResourceMetricRuleRequest.PutResourceMetricRuleRequestLabels> getLabels()
public PutResourceMetricRuleRequest setMetricName(String metricName)
public String getMetricName()
public PutResourceMetricRuleRequest setNamespace(String namespace)
public String getNamespace()
public PutResourceMetricRuleRequest setNoDataPolicy(String noDataPolicy)
public String getNoDataPolicy()
public PutResourceMetricRuleRequest setNoEffectiveInterval(String noEffectiveInterval)
public String getNoEffectiveInterval()
public PutResourceMetricRuleRequest setPeriod(String period)
public String getPeriod()
public PutResourceMetricRuleRequest setPrometheus(PutResourceMetricRuleRequest.PutResourceMetricRuleRequestPrometheus prometheus)
public PutResourceMetricRuleRequest.PutResourceMetricRuleRequestPrometheus getPrometheus()
public PutResourceMetricRuleRequest setResources(String resources)
public String getResources()
public PutResourceMetricRuleRequest setRuleId(String ruleId)
public String getRuleId()
public PutResourceMetricRuleRequest setRuleName(String ruleName)
public String getRuleName()
public PutResourceMetricRuleRequest setSilenceTime(Integer silenceTime)
public Integer getSilenceTime()
public PutResourceMetricRuleRequest setWebhook(String webhook)
public String getWebhook()
Copyright © 2024. All rights reserved.