public static final class PutResourceMetricRuleRequest.CompositeExpression.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
PutResourceMetricRuleRequest.CompositeExpression |
build() |
PutResourceMetricRuleRequest.CompositeExpression.Builder |
expressionList(List<PutResourceMetricRuleRequest.ExpressionList> expressionList)
The trigger conditions that are created in standard mode.
|
PutResourceMetricRuleRequest.CompositeExpression.Builder |
expressionListJoin(String expressionListJoin)
The relationship between the trigger conditions for multiple metrics.
|
PutResourceMetricRuleRequest.CompositeExpression.Builder |
expressionRaw(String expressionRaw)
The trigger conditions that are created by using expressions.
|
PutResourceMetricRuleRequest.CompositeExpression.Builder |
level(String level)
The alert level.
|
PutResourceMetricRuleRequest.CompositeExpression.Builder |
times(Integer times)
The number of consecutive triggers.
|
public PutResourceMetricRuleRequest.CompositeExpression.Builder expressionList(List<PutResourceMetricRuleRequest.ExpressionList> expressionList)
The trigger conditions that are created in standard mode.
public PutResourceMetricRuleRequest.CompositeExpression.Builder expressionListJoin(String expressionListJoin)
The relationship between the trigger conditions for multiple metrics. Valid value:
&&: An alert is triggered only if all metrics meet the trigger conditions. An alert is triggered only if the results of all expressions specified in the ExpressionList parameter are true.||: An alert is triggered if one of the metrics meets the trigger conditions.||
public PutResourceMetricRuleRequest.CompositeExpression.Builder expressionRaw(String expressionRaw)
The trigger conditions that are created by using expressions. You can use expressions to create trigger conditions in the following scenarios:
$instanceId != \"i-io8kfvcpp7x5****\" ``&&`` $Average > 50, no alert is triggered when the average metric value of the i-io8kfvcpp7x5**** instance exceeds 50.$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.count($Average > 20) > 3, an alert is triggered only when the average metric value of more than three instances exceeds 20.$Average > ($instanceId == "i-io8kfvcpp7x5****"? 80: 50)
public PutResourceMetricRuleRequest.CompositeExpression.Builder level(String level)
The alert level. Valid values:
Critical
public PutResourceMetricRuleRequest.CompositeExpression.Builder times(Integer times)
The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
example:3
public PutResourceMetricRuleRequest.CompositeExpression build()
Copyright © 2026. All rights reserved.