public static final class PutGroupMetricRuleRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
PutGroupMetricRuleRequest |
build() |
PutGroupMetricRuleRequest.Builder |
category(String category)
The abbreviation of the cloud service name.
|
PutGroupMetricRuleRequest.Builder |
contactGroups(String contactGroups)
The alert contact group.
|
PutGroupMetricRuleRequest.Builder |
dimensions(String dimensions)
The first-level dimension of the alert rule in the application group.
|
PutGroupMetricRuleRequest.Builder |
effectiveInterval(String effectiveInterval)
The time period during which the alert rule is effective.
|
PutGroupMetricRuleRequest.Builder |
emailSubject(String emailSubject)
The subject of the alert notification email.
|
PutGroupMetricRuleRequest.Builder |
escalations(PutGroupMetricRuleRequest.Escalations escalations)
Escalations.
|
PutGroupMetricRuleRequest.Builder |
extraDimensionJson(String extraDimensionJson)
The second-level or third-level dimension of the alert rule in the application group.
|
PutGroupMetricRuleRequest.Builder |
groupId(String groupId)
The application group ID.
|
PutGroupMetricRuleRequest.Builder |
interval(String interval)
The interval at which CloudMonitor checks whether the alert rule is triggered.
|
PutGroupMetricRuleRequest.Builder |
labels(List<PutGroupMetricRuleRequest.Labels> labels)
The tags of the alert rule.
|
PutGroupMetricRuleRequest.Builder |
metricName(String metricName)
The metric name.
|
PutGroupMetricRuleRequest.Builder |
namespace(String namespace)
The namespace of the cloud service.
|
PutGroupMetricRuleRequest.Builder |
noDataPolicy(String noDataPolicy)
The method that is used to handle alerts when no monitoring data is found.
|
PutGroupMetricRuleRequest.Builder |
noEffectiveInterval(String noEffectiveInterval)
The time period during which the alert rule is ineffective.
|
PutGroupMetricRuleRequest.Builder |
options(String options)
Options.
|
PutGroupMetricRuleRequest.Builder |
period(String period)
The aggregation period of the metric data.
|
PutGroupMetricRuleRequest.Builder |
ruleId(String ruleId)
The ID of the alert rule.
|
PutGroupMetricRuleRequest.Builder |
ruleName(String ruleName)
The name of the alert rule.
|
PutGroupMetricRuleRequest.Builder |
silenceTime(Integer silenceTime)
The mute period during which new alerts are not sent even if the trigger conditions are met.
|
PutGroupMetricRuleRequest.Builder |
webhook(String webhook)
The callback URL.
|
public PutGroupMetricRuleRequest.Builder escalations(PutGroupMetricRuleRequest.Escalations escalations)
public PutGroupMetricRuleRequest.Builder category(String category)
The abbreviation of the cloud service name.
For more information about how to obtain the abbreviation of a cloud service name, see metricCategory in the response parameter Labels of the DescribeProjectMeta operation.
ECS
public PutGroupMetricRuleRequest.Builder contactGroups(String contactGroups)
The alert contact group.
example:ECS_Group
public PutGroupMetricRuleRequest.Builder dimensions(String dimensions)
The first-level dimension of the alert rule in the application group.
Set the value to a set of key-value pairs, for example, userId:120886317861**** or instanceId:i-m5e1qg6uo38rztr4****.
[{"instanceId":"i-m5e1qg6uo38rztr4****"}]
public PutGroupMetricRuleRequest.Builder effectiveInterval(String effectiveInterval)
The time period during which the alert rule is effective.
example:05:31-23:59
public PutGroupMetricRuleRequest.Builder emailSubject(String emailSubject)
The subject of the alert notification email.
public PutGroupMetricRuleRequest.Builder extraDimensionJson(String extraDimensionJson)
The second-level or third-level dimension of the alert rule in the application group.
Set the value to a set of key-value pairs, for example, port:80 or /dev/xvda:d-m5e6yphgzn3aprwu****.
If the first-level dimension of the alert rule is instanceId:i-m5e1qg6uo38rztr4****, its second-level dimension is the /dev/xvda:d-m5e6yphgzn3aprwu**** disk in the instance.
{"/dev/xvda":"d-m5e6yphgzn3aprwu****"}
public PutGroupMetricRuleRequest.Builder groupId(String groupId)
The application group ID.
For more information about how to obtain the ID of an application group, see DescribeMonitorGroups.
This parameter is required.
example:17285****
public PutGroupMetricRuleRequest.Builder interval(String interval)
The interval at which CloudMonitor checks whether the alert rule is triggered. Unit: seconds.
example:We recommend that you set the interval to the data aggregation period. If the interval is shorter than the data aggregation period, alerts cannot be triggered due to insufficient data.
60
public PutGroupMetricRuleRequest.Builder labels(List<PutGroupMetricRuleRequest.Labels> labels)
The tags of the alert rule.
The specified tag is contained in alert notifications.
public PutGroupMetricRuleRequest.Builder metricName(String metricName)
The metric name.
For more information about how to obtain the name of a metric, see DescribeMetricMetaList or Appendix 1: Metrics.
This parameter is required.
example:cpu_total
public PutGroupMetricRuleRequest.Builder namespace(String namespace)
The namespace of the cloud service.
For more information about how to obtain the namespace of a cloud service, see DescribeMetricMetaList or Appendix 1: Metrics.
This parameter is required.
example:acs_ecs_dashboard
public PutGroupMetricRuleRequest.Builder noDataPolicy(String noDataPolicy)
The method that is used to handle alerts when no monitoring data is found. Valid values:
KEEP_LAST_STATE
public PutGroupMetricRuleRequest.Builder noEffectiveInterval(String noEffectiveInterval)
The time period during which the alert rule is ineffective.
example:00:00-05:30
public PutGroupMetricRuleRequest.Builder options(String options)
public PutGroupMetricRuleRequest.Builder period(String period)
The aggregation period of the metric data.
Set the Period parameter to an integral multiple of 60. Unit: seconds. Default value: 300.
60
public PutGroupMetricRuleRequest.Builder ruleId(String ruleId)
The ID of the alert rule.
This parameter is required.
example:123456
public PutGroupMetricRuleRequest.Builder ruleName(String ruleName)
The name of the alert rule.
This parameter is required.
example:Rule_01
public PutGroupMetricRuleRequest.Builder silenceTime(Integer silenceTime)
The mute period during which new alerts are not sent even if the trigger conditions are met.
Unit: seconds. Default value: 86400.
example:86400
public PutGroupMetricRuleRequest.Builder webhook(String webhook)
The callback URL.
The callback URL must be accessible over the Internet. CloudMonitor sends a POST request to push an alert notification to the callback URL that you specify. Only HTTP requests are supported.
example:public PutGroupMetricRuleRequest build()
Copyright © 2026. All rights reserved.