public static final class CreateGroupMetricRulesRequest.GroupMetricRules.Builder extends Object
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder escalations(CreateGroupMetricRulesRequest.Escalations escalations)
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder category(String category)
The name of the cloud service. Valid values of N: 1 to 200. Valid value:
This parameter is required.
example:ECS
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder contactGroups(String contactGroups)
The alert contact groups. Valid values of N: 1 to 200.
For information about how to obtain alert contact groups, see DescribeContactGroupList.
example:ECS_Group
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder dimensions(String dimensions)
The dimension of the alert rule. Valid values of N: 1 to 200.
Set the value to a set of key-value pairs, for example, userId:120886317861**** or instanceId:i-m5e1qg6uo38rztr4****.
[{"instanceId":"i-m5e1qg6uo38rztr4****"}]
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder effectiveInterval(String effectiveInterval)
The time period during which the alert rule is effective. Valid values of N: 1 to 200.
example:05:31-23:59
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder emailSubject(String emailSubject)
The subject of the alert notification email. Valid values of N: 1 to 200.
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder interval(String interval)
The interval at which CloudMonitor checks whether the alert rule is triggered. Valid values of N: 1 to 200.
Unit: seconds. The default value is the lowest frequency at which the metric is polled.
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 CreateGroupMetricRulesRequest.GroupMetricRules.Builder labels(List<CreateGroupMetricRulesRequest.Labels> labels)
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder metricName(String metricName)
The name of the metric. Valid values of N: 1 to 200.
For information about how to obtain the name of a metric, see DescribeMetricMetaList or Appendix 1: Metrics.
This parameter is required.
example:cpu_total
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder namespace(String namespace)
The namespace of the cloud service. Valid values of N: 1 to 200.
For 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 CreateGroupMetricRulesRequest.GroupMetricRules.Builder noDataPolicy(String noDataPolicy)
The method that is used to handle alerts when no monitoring data is found. Valid values of N: 1 to 200. Valid value:
KEEP_LAST_STATE
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder noEffectiveInterval(String noEffectiveInterval)
The time period during which the alert rule is ineffective. Valid values of N: 1 to 200.
example:00:00-05:30
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder options(String options)
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder period(String period)
The aggregation period of the metric data. Valid values of N: 1 to 200.
Set the Period parameter to an integral multiple of 60. Unit: seconds. Default value: 300.
60
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder ruleId(String ruleId)
The ID of the alert rule. Valid values of N: 1 to 200.
This parameter is required.
example:456789
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder ruleName(String ruleName)
The name of the alert rule. Valid values of N: 1 to 200.
This parameter is required.
example:ECS_Rule1
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder silenceTime(Integer silenceTime)
The mute period during which new alerts are not sent even if the trigger conditions are met. Valid values of N: 1 to 200.
Unit: seconds. Default value: 86400. Minimum value: 3600.
example:86400
public CreateGroupMetricRulesRequest.GroupMetricRules.Builder webhook(String webhook)
The callback URL. Valid values of N: 1 to 200.
The callback URL must be accessible over the Internet. CloudMonitor pushes an alert notification to the specified callback URL by sending an HTTP POST request. Only the HTTP protocol is supported.
example:public CreateGroupMetricRulesRequest.GroupMetricRules build()
Copyright © 2026. All rights reserved.