UpdateAlertRule
Updates a custom monitoring alert rule.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
integer |
No |
The ID of the alert rule to update. You can obtain the ID from the PagingInfo.AlertRules[].Id parameter returned by the ListAlertRules operation. |
105412 |
| Name |
string |
No |
The name of the alert rule. This parameter is required. |
collection_name |
| Owner |
string |
No |
The UID of the Alibaba Cloud account of the alert rule owner. This parameter is required. |
193379**** |
| Enabled |
boolean |
No |
Specifies whether to enable the alert rule. This parameter is required. Valid values:
|
true |
| TriggerCondition |
object |
No |
The condition that triggers the alert. This parameter is required. |
|
| Type |
string |
No |
The type of the trigger condition. The value is case-sensitive. Valid values:
|
Error |
| Extension |
object |
No |
The extension information. This parameter is required for specific trigger conditions. |
|
| Error |
object |
No |
The alert configuration for error alerting. |
|
| StreamTaskIds |
array |
No |
The IDs of the real-time computing tasks to monitor. |
|
|
integer |
No |
The ID of the real-time computing task. |
123123 |
|
| AutoRerunAlertEnabled |
boolean |
No |
Specifies whether to generate an alert when an offline task is automatically rerun due to a failure. |
false |
| Timeout |
object |
No |
The alert configuration for timeout alerting. |
|
| TimeoutInMinutes |
integer |
No |
The timeout period. Unit: minutes. |
10 |
| UnFinished |
object |
No |
The settings for alerts when an instance has not finished. |
|
| UnFinishedTime |
string |
No |
The deadline for completion, in |
12:00 |
| CycleUnfinished |
object |
No |
The settings for alerts when a cycle has not finished. |
|
| CycleAndTime |
array<object> |
No |
The list of cycle and time configurations. |
|
|
object |
No |
|||
| CycleId |
integer |
No |
The cycle ID. Valid values: 1 to 288. |
1 |
| Time |
string |
No |
The deadline for completion, in |
01:00 |
| InstanceErrorCount |
object |
No |
The alert configuration for node instance error count alerting. |
|
| Count |
integer |
No |
The number of task instances with errors. Valid values: 1 to 10000. |
10 |
| InstanceErrorPercentage |
object |
No |
The alert configuration for node instance error percentage alerting. |
|
| Percentage |
integer |
No |
The percentage of instances with errors. Valid values: 1 to 100. |
10 |
| InstanceTransferFluctuate |
object |
No |
The alert configuration for transferred instance fluctuation alerting. |
|
| Trend |
string |
No |
The type of fluctuation in the number of transferred instances. Valid values:
|
abs |
| Percentage |
integer |
No |
The percentage of fluctuation in the number of transferred instances. Valid values: 1 to 100. |
10 |
| Target |
object |
No |
The monitored object. |
|
| Type |
string |
No |
The monitored object type. Valid values:
|
Task |
| Ids |
array |
No |
The list of monitored object IDs. |
|
|
integer |
No |
The ID of the monitored object. |
1894580 |
|
| AllowTasks |
array |
No |
The whitelist of monitored tasks. |
|
|
integer |
No |
The ID of the task in the whitelist. |
1111 |
|
| Notification |
object |
No |
The alert notification configuration. |
|
| SilenceStartTime |
string |
No |
The start time of the alert silence period. Use the 24-hour clock. Format: |
22:00 |
| SilenceEndTime |
string |
No |
The end time of the alert silence period. Use the 24-hour clock. Format: |
23:00 |
| IntervalInMinutes |
integer |
No |
The alert interval. Unit: minutes. Valid values: 5 to 10000. |
30 |
| Maximum |
integer |
No |
The maximum number of alerts per calendar day. Valid values: 1 to 10000. |
3 |
| Channels |
array |
No |
The list of alert channels. |
|
|
string |
No |
The alert channel. Valid values:
|
Sms |
|
| Receivers |
array<object> |
No |
The alert recipients. |
|
|
object |
No |
|||
| ReceiverType |
string |
No |
The alert recipient type. Valid values:
|
TaskOwner |
| ReceiverValues |
array |
No |
The values of the alert recipients. |
|
|
string |
No |
The value of the alert recipient. If ReceiverType is set to AliUid, enter the Alibaba Cloud UID. If ReceiverType is set to ShiftSchedule, enter the shift schedule ID. If ReceiverType is set to WebhookUrl, DingdingUrl, FeishuUrl, or WeixinUrl, enter the corresponding URL. |
123123 |
|
| Extension |
string |
No |
The additional configuration required for the alert recipient. If ReceiverType is set to DingdingUrl, you can set this parameter to |
{"atAll":true} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. You can use the ID to locate logs and troubleshoot issues. |
D85FEE2B-6174-5817-AF9E-FDD02FEDA5BC |
| Success |
boolean |
Indicates whether the alert rule is updated. |
true |
Examples
Success response
JSON format
{
"RequestId": "D85FEE2B-6174-5817-AF9E-FDD02FEDA5BC",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.