public static final class PutResourceMetricRuleRequest.Builder extends Object
public PutResourceMetricRuleRequest.Builder escalations(PutResourceMetricRuleRequest.Escalations escalations)
public PutResourceMetricRuleRequest.Builder compositeExpression(PutResourceMetricRuleRequest.CompositeExpression compositeExpression)
> 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 contactGroups(String contactGroups)
* Maximum: the maximum value * Minimum: the minimum value * Average: the average value * Availability: the availability rate > You must select at least one of the Critical, Warn, and Info alert levels and specify the Statistics, ComparisonOperator, Threshold, and Times parameters for the selected alert level.
public PutResourceMetricRuleRequest.Builder effectiveInterval(String effectiveInterval)
* GreaterThanOrEqualToThreshold: greater than or equal to the threshold * GreaterThanThreshold: greater than the threshold * LessThanOrEqualToThreshold: less than or equal to the threshold * LessThanThreshold: less than the threshold * NotEqualToThreshold: not equal to the threshold * GreaterThanYesterday: greater than the metric value at the same time yesterday * LessThanYesterday: less than the metric value at the same time yesterday * GreaterThanLastWeek: greater than the metric value at the same time last week * LessThanLastWeek: less than the metric value at the same time last week * GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle * LessThanLastPeriod: less than the metric value in the last monitoring cycle > You must select at least one of the Critical, Warn, and Info alert levels and specify the Statistics, ComparisonOperator, Threshold, and Times parameters for the selected alert level.
public PutResourceMetricRuleRequest.Builder emailSubject(String emailSubject)
> If you create a Prometheus alert rule for Hybrid Cloud Monitoring, you must set this parameter to `acs_prometheus`.
public PutResourceMetricRuleRequest.Builder interval(String interval)
public PutResourceMetricRuleRequest.Builder labels(List<PutResourceMetricRuleRequest.Labels> labels)
public PutResourceMetricRuleRequest.Builder metricName(String metricName)
public PutResourceMetricRuleRequest.Builder namespace(String namespace)
public PutResourceMetricRuleRequest.Builder noDataPolicy(String noDataPolicy)
public PutResourceMetricRuleRequest.Builder noEffectiveInterval(String noEffectiveInterval)
public PutResourceMetricRuleRequest.Builder period(String period)
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 prometheus(PutResourceMetricRuleRequest.Prometheus prometheus)
public PutResourceMetricRuleRequest.Builder resources(String resources)
* GreaterThanOrEqualToThreshold: greater than or equal to the threshold * GreaterThanThreshold: greater than the threshold * LessThanOrEqualToThreshold: less than or equal to the threshold * LessThanThreshold: less than the threshold * NotEqualToThreshold: not equal to the threshold * GreaterThanYesterday: greater than the metric value at the same time yesterday * LessThanYesterday: less than the metric value at the same time yesterday * GreaterThanLastWeek: greater than the metric value at the same time last week * LessThanLastWeek: less than the metric value at the same time last week * GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle * LessThanLastPeriod: less than the metric value in the last monitoring cycle > You must select at least one of the Critical, Warn, and Info alert levels and specify the Statistics, ComparisonOperator, Threshold, and Times parameters for the selected alert level.
public PutResourceMetricRuleRequest.Builder ruleId(String ruleId)
public PutResourceMetricRuleRequest.Builder ruleName(String ruleName)
* Critical * Warn * Info
public PutResourceMetricRuleRequest.Builder silenceTime(Integer silenceTime)
> For information about how to query the statistical period of a metric, see [Appendix 1: Metrics](~~163515~~).
public PutResourceMetricRuleRequest.Builder webhook(String webhook)
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 build()
Copyright © 2023. All rights reserved.