public static final class ApplyMetricRuleTemplateRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
ApplyMetricRuleTemplateRequest.Builder |
appendMode(String appendMode)
AppendMode.
|
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)
public ApplyMetricRuleTemplateRequest.Builder applyMode(String applyMode)
* GROUP_INSTANCE_FIRST: The metrics in the application group take precedence. If a metric specified in the alert template does not exist in the application group, the system does not generate an alert rule for the metric based on the alert template. * ALARM_TEMPLATE_FIRST: The metrics specified in the alert template take precedence. If a metric specified in the alert template does not exist in the application group, the system still generates an alert rule for the metric based on the alert template.
public ApplyMetricRuleTemplateRequest.Builder enableEndTime(Long enableEndTime)
public ApplyMetricRuleTemplateRequest.Builder enableStartTime(Long enableStartTime)
public ApplyMetricRuleTemplateRequest.Builder groupId(Long groupId)
For more information about how to query the ID of an application group, see [DescribeMonitorGroups](~~115032~~).
public ApplyMetricRuleTemplateRequest.Builder notifyLevel(Long notifyLevel)
Set the value to 4. A value of 4 indicates that alert notifications are sent by using TradeManager and DingTalk chatbots.
public ApplyMetricRuleTemplateRequest.Builder silenceTime(Long silenceTime)
> Only one alert notification is sent during each mute period even if the metric value exceeds the alert threshold several times.
public ApplyMetricRuleTemplateRequest.Builder templateIds(String templateIds)
For more information about how to query the IDs of alert templates, see [DescribeMetricRuleTemplateList](~~114982~~).
public ApplyMetricRuleTemplateRequest.Builder webhook(String webhook)
public ApplyMetricRuleTemplateRequest build()
Copyright © 2024. All rights reserved.