public static final class DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder extends Object
| 构造器和说明 |
|---|
Builder() |
public DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder comparisonOperator(String comparisonOperator)
* 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
public DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder expression(String expression)
> This parameter indicates the content of the alert rule. If the metric value meets the alert condition, an alert is triggered.
public DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder expressionList(DescribeAlertingMetricRuleResourcesResponseBody.ResourceExpressionList expressionList)
public DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder expressionListJoin(String expressionListJoin)
* &&: If all metrics meet the alert conditions, CloudMonitor sends alert notifications. * ||: If one of the metrics meets the alert conditions, CloudMonitor sends alert notifications.
public DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder expressionRaw(String expressionRaw)
* Set an alert blacklist for specific resources. For example, if you specify `$instanceId != \"i-io8kfvcpp7x5****\" ``&&`` $Average > 50`, no alert is triggered when the `average metric value` of the `i-io8kfvcpp7x5****` instance exceeds 50. * Set a special alert threshold for a specified instance in the rule. For example, if you specify `$Average > ($instanceId == \"i-io8kfvcpp7x5****\"? 80: 50)`, an alert is triggered when the `average metric value` of the `i-io8kfvcpp7x5****` instance exceeds 80 or the `average metric value` of other instances exceeds 50. * Limit the number of instances whose metric values exceed the threshold. For example, if you specify `count($Average > 20) > 3`, an alert is triggered only when the `average metric value` of more than three instances exceeds 20.
public DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder level(Integer level)
* 4: Alert notifications are sent by using emails and DingTalk chatbots. * OK: No alert is generated.
public DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder preCondition(String preCondition)
* `>=` * `=` * `<=` * `>` * `<` * `!=`
public DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder tag(String tag)
public DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder threshold(String threshold)
public DescribeAlertingMetricRuleResourcesResponseBody.Resource.Builder times(Integer times)
public DescribeAlertingMetricRuleResourcesResponseBody.Resource build()
Copyright © 2024. All rights reserved.