public static final class ApplyMetricRuleTemplateRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
ApplyMetricRuleTemplateRequest.Builder |
appendMode(String appendMode)
The template application policy.
|
ApplyMetricRuleTemplateRequest.Builder |
applyMode(String applyMode)
The mode in which the alert template is applied.
|
ApplyMetricRuleTemplateRequest |
build() |
ApplyMetricRuleTemplateRequest.Builder |
enableEndTime(Long enableEndTime)
The end of the time period during which the alert rule is effective.
|
ApplyMetricRuleTemplateRequest.Builder |
enableStartTime(Long enableStartTime)
The beginning of the time period during which the alert rule is effective.
|
ApplyMetricRuleTemplateRequest.Builder |
groupId(Long groupId)
The ID of the application group to which the alert template is applied.
|
ApplyMetricRuleTemplateRequest.Builder |
notifyLevel(Long notifyLevel)
The alert notification method.
|
ApplyMetricRuleTemplateRequest.Builder |
silenceTime(Long silenceTime)
The mute period during which notifications are not repeatedly sent for an alert.
|
ApplyMetricRuleTemplateRequest.Builder |
templateIds(String templateIds)
The ID of the alert template.
|
ApplyMetricRuleTemplateRequest.Builder |
webhook(String webhook)
The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
|
public ApplyMetricRuleTemplateRequest.Builder appendMode(String appendMode)
The template application policy. Valid values:
all
public ApplyMetricRuleTemplateRequest.Builder applyMode(String applyMode)
The mode in which the alert template is applied. Valid values:
GROUP_INSTANCE_FIRST
public ApplyMetricRuleTemplateRequest.Builder enableEndTime(Long enableEndTime)
The end of the time period during which the alert rule is effective. Valid values: 00 to 23. A value of 00 indicates 00:59 and a value of 23 indicates 23:59.
example:23
public ApplyMetricRuleTemplateRequest.Builder enableStartTime(Long enableStartTime)
The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. A value of 00 indicates 00:00 and a value of 23 indicates 23:00.
example:00
public ApplyMetricRuleTemplateRequest.Builder groupId(Long groupId)
The ID of the application group to which the alert template is applied.
For more information about how to query the ID of an application group, see DescribeMonitorGroups.
This parameter is required.
example:123456
public ApplyMetricRuleTemplateRequest.Builder notifyLevel(Long notifyLevel)
The alert notification method. Valid values:
Set the value to 4. A value of 4 indicates that alert notifications are sent by using TradeManager and DingTalk chatbots.
example:4
public ApplyMetricRuleTemplateRequest.Builder silenceTime(Long silenceTime)
The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400.
example:Only one alert notification is sent during each mute period even if the metric value exceeds the alert threshold several times.
86400
public ApplyMetricRuleTemplateRequest.Builder templateIds(String templateIds)
The ID of the alert template.
For more information about how to query the IDs of alert templates, see DescribeMetricRuleTemplateList.
This parameter is required.
example:700****
public ApplyMetricRuleTemplateRequest.Builder webhook(String webhook)
The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
example:public ApplyMetricRuleTemplateRequest build()
Copyright © 2026. All rights reserved.