public static final class PutResourceMetricRulesRequest.Rules.Builder extends Object
| 构造器和说明 |
|---|
Builder() |
| 限定符和类型 | 方法和说明 |
|---|---|
PutResourceMetricRulesRequest.Rules |
build() |
PutResourceMetricRulesRequest.Rules.Builder |
contactGroups(String contactGroups)
The alert contact groups.
|
PutResourceMetricRulesRequest.Rules.Builder |
effectiveInterval(String effectiveInterval)
The time period during which the alert rule is effective.
|
PutResourceMetricRulesRequest.Rules.Builder |
emailSubject(String emailSubject)
The subject of the alert notification email.
|
PutResourceMetricRulesRequest.Rules.Builder |
escalations(PutResourceMetricRulesRequest.Escalations escalations)
Escalations.
|
PutResourceMetricRulesRequest.Rules.Builder |
interval(String interval)
The interval at which alerts are triggered based on the alert rule.
|
PutResourceMetricRulesRequest.Rules.Builder |
labels(List<PutResourceMetricRulesRequest.Labels> 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.
|
PutResourceMetricRulesRequest.Rules.Builder |
metricName(String metricName)
The metric name.
|
PutResourceMetricRulesRequest.Rules.Builder |
namespace(String namespace)
The namespace of the cloud service.
|
PutResourceMetricRulesRequest.Rules.Builder |
noDataPolicy(String noDataPolicy)
The method that is used to handle alerts when no monitoring data is found.
|
PutResourceMetricRulesRequest.Rules.Builder |
noEffectiveInterval(String noEffectiveInterval)
The time period during which the alert rule is ineffective.
|
PutResourceMetricRulesRequest.Rules.Builder |
period(String period)
The statistical period of the metric.
|
PutResourceMetricRulesRequest.Rules.Builder |
resources(String resources)
The information about the resource.
|
PutResourceMetricRulesRequest.Rules.Builder |
ruleId(String ruleId)
The ID of the alert rule.
|
PutResourceMetricRulesRequest.Rules.Builder |
ruleName(String ruleName)
The name of the alert rule.
|
PutResourceMetricRulesRequest.Rules.Builder |
silenceTime(Integer silenceTime)
The mute period during which new alert notifications are not sent even if the trigger conditions are met.
|
PutResourceMetricRulesRequest.Rules.Builder |
webhook(String webhook)
The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
|
public PutResourceMetricRulesRequest.Rules.Builder escalations(PutResourceMetricRulesRequest.Escalations escalations)
public PutResourceMetricRulesRequest.Rules.Builder contactGroups(String contactGroups)
Valid values of N: 1 to 500. > 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~~).
public PutResourceMetricRulesRequest.Rules.Builder effectiveInterval(String effectiveInterval)
Valid values of N: 1 to 500.
public PutResourceMetricRulesRequest.Rules.Builder emailSubject(String emailSubject)
Valid values of N: 1 to 500.
public PutResourceMetricRulesRequest.Rules.Builder interval(String interval)
Unit: seconds. Valid values of N: 1 to 500. > For information about how to query the statistical period of a metric, see [Appendix 1: Metrics](~~163515~~).
public PutResourceMetricRulesRequest.Rules.Builder labels(List<PutResourceMetricRulesRequest.Labels> labels)
public PutResourceMetricRulesRequest.Rules.Builder metricName(String metricName)
Valid values of N: 1 to 500. For information about how to query the name of a metric, see [Appendix 1: Metrics](~~163515~~).
public PutResourceMetricRulesRequest.Rules.Builder namespace(String namespace)
Valid values of N: 1 to 500. For information about how to query the namespace of a cloud service, see [Appendix 1: Metrics](~~163515~~).
public PutResourceMetricRulesRequest.Rules.Builder noDataPolicy(String noDataPolicy)
* KEEP_LAST_STATE (default): No operation is performed. * INSUFFICIENT_DATA: An alert whose content is "Insufficient data" is triggered. * OK: The status is considered normal. Valid values of N: 1 to 500.
public PutResourceMetricRulesRequest.Rules.Builder noEffectiveInterval(String noEffectiveInterval)
Valid values of N: 1 to 500.
public PutResourceMetricRulesRequest.Rules.Builder period(String period)
Unit: seconds. The default value is the interval at which the monitoring data of the metric is collected. Valid values of N: 1 to 500. > For information about how to query the statistical period of a metric, see [Appendix 1: Metrics](~~163515~~).
public PutResourceMetricRulesRequest.Rules.Builder resources(String resources)
Valid values of N: 1 to 500. For more information about the supported dimensions that are used to query resources, see [Appendix 1: Metrics](~~163515~~).
public PutResourceMetricRulesRequest.Rules.Builder ruleId(String ruleId)
Valid values of N: 1 to 500. 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.
public PutResourceMetricRulesRequest.Rules.Builder ruleName(String ruleName)
Valid values of N: 1 to 500. 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.
public PutResourceMetricRulesRequest.Rules.Builder silenceTime(Integer silenceTime)
Unit: seconds. Default value: 86400. Valid values of N: 1 to 500. > If an alert is not cleared after the mute period ends, CloudMonitor resends an alert notification.
public PutResourceMetricRulesRequest.Rules.Builder webhook(String webhook)
Valid values of N: 1 to 500.
public PutResourceMetricRulesRequest.Rules build()
Copyright © 2024. All rights reserved.