public static final class PutResourceMetricRuleRequest.Builder extends Object
public PutResourceMetricRuleRequest.Builder escalations(PutResourceMetricRuleRequest.Escalations escalations)
public PutResourceMetricRuleRequest.Builder compositeExpression(PutResourceMetricRuleRequest.CompositeExpression compositeExpression)
> 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.
public PutResourceMetricRuleRequest.Builder contactGroups(String contactGroups)
> 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 PutResourceMetricRuleRequest.Builder effectiveInterval(String effectiveInterval)
public PutResourceMetricRuleRequest.Builder emailSubject(String emailSubject)
public PutResourceMetricRuleRequest.Builder interval(String interval)
> For information about how to query the statistical period of a metric, see [Appendix 1: Metrics](~~163515~~).
public PutResourceMetricRuleRequest.Builder labels(List<PutResourceMetricRuleRequest.Labels> labels)
public PutResourceMetricRuleRequest.Builder metricName(String metricName)
> 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~~).
public PutResourceMetricRuleRequest.Builder namespace(String namespace)
> If you create a Prometheus alert rule for Hybrid Cloud Monitoring, you must set this parameter to `acs_prometheus`.
public PutResourceMetricRuleRequest.Builder noDataPolicy(String noDataPolicy)
* 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.
public PutResourceMetricRuleRequest.Builder noEffectiveInterval(String noEffectiveInterval)
public PutResourceMetricRuleRequest.Builder period(String period)
> For information about how to query the statistical period of a metric, see [Appendix 1: Metrics](~~163515~~).
public PutResourceMetricRuleRequest.Builder prometheus(PutResourceMetricRuleRequest.Prometheus prometheus)
> This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.
public PutResourceMetricRuleRequest.Builder resources(String resources)
For information about the supported dimensions that are used to query resources, see [Appendix 1: Metrics](~~163515~~).
public PutResourceMetricRuleRequest.Builder ruleId(String ruleId)
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 PutResourceMetricRuleRequest.Builder ruleName(String ruleName)
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 PutResourceMetricRuleRequest.Builder silenceTime(Integer silenceTime)
> If an alert is not cleared within the mute period, a new alert notification is sent when the mute period ends.
public PutResourceMetricRuleRequest.Builder webhook(String webhook)
public PutResourceMetricRuleRequest build()
Copyright © 2024. All rights reserved.