UpdateAlertRule

Updated at:

Updates a custom monitoring alert rule.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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: Enabled.

  • false: Disabled.

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:

  • Finished: The instance is completed.

  • UnFinished: The instance is not completed.

  • Error: An error occurs on the instance.

  • CycleUnfinished: The instance cycle is not completed.

  • Timeout: The instance times out.

  • InstanceTransferComplete: The task is transferred to an instance.

  • InstanceTransferFluctuate: The number of instances fluctuates.

  • ExhaustedError: An error still occurs after automatic reruns.

  • InstanceKeyword: The error instance contains a keyword.

  • InstanceErrorCount: The number of error instances.

  • InstanceErrorPercentage: The percentage of error instances.

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 hh:mm format. Valid values for hh: 0 to 47. Valid values for mm: 0 to 59.

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 hh:mm format. Valid values for hh: 0 to 47. Valid values for mm: 0 to 59.

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: Absolute value.

  • increase: Increase.

  • decrease: Decrease.

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: Node.

  • Baseline: Baseline.

  • Project: Workspace.

  • BizProcess: Business flow.

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: HH:mm.

22:00

SilenceEndTime

string

No

The end time of the alert silence period. Use the 24-hour clock. Format: HH:mm.

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:

  • Mail: Email.

  • Phone: Phone call.

  • Sms: Text message.

  • Dingding: DingTalk webhook.

  • Feishu: Lark webhook.

  • Weixin: WeCom webhook.

  • Webhook: Custom webhook.

Sms

Receivers

array<object>

No

The alert recipients.

object

No

ReceiverType

string

No

The alert recipient type. Valid values:

  • AliUid: Alibaba Cloud UID.

  • ShiftSchedule: Shift schedule.

  • TaskOwner: Node owner. This value applies to custom alerting and event alerting.

  • Owner: Owner. This value applies to baseline alerting.

  • WebhookUrl: Custom webhook URL.

  • DingdingUrl: DingTalk webhook URL.

  • FeishuUrl: Lark webhook URL.

  • WeixinUrl: WeCom webhook URL.

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} to mention all members.

{"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.