Creates an alert rule for a data integration task.
Operation description
You must purchase DataWorks Basic Edition or a higher edition to use this feature.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Description |
string |
No |
The description of the alert rule. |
Alert description |
| MetricType |
string |
Yes |
The alert metric type. Valid values:
|
Heartbeat |
| Enabled |
boolean |
No |
Specifies whether to enable the alert rule. By default, the alert rule is disabled. |
true |
| DIJobId |
integer |
Yes |
The task ID associated with the alert rule. |
1 |
| ClientToken |
string |
No |
The idempotency parameter. |
ABFUOEUOTRTRJKE |
| Name |
string |
Yes |
The name of the alert rule. |
alartRule |
| TriggerConditions |
array<object> |
Yes |
The list of alert trigger conditions. Multiple conditions are supported. |
|
|
object |
No |
The list of alert trigger conditions. Multiple conditions are supported. |
||
| Severity |
string |
No |
The severity level. Valid values:
|
Warning |
| Duration |
integer |
No |
The time window for alert calculation. Unit: minutes. |
10 |
| Threshold |
integer |
No |
The alert threshold.
|
10 |
| DdlTypes |
array |
No |
The list of DDL types that take effect. This parameter takes effect only when the metric type is DDL notification. |
|
|
string |
No |
The list of DDL types that take effect. This parameter is returned only when MetricType is set to DdlReport. Valid values:
|
AlterAddColumn |
|
DdlReportTags
deprecated
|
array |
No |
[Deprecated] Use the DdlTypes parameter instead. |
|
deprecated
|
string |
No |
[Deprecated] Use the DdlTypes parameter instead. |
AlterAddColumn |
| NotificationSettings |
object |
Yes |
The alert notification settings. |
|
| NotificationChannels |
array<object> |
No |
The alert notification channels. |
|
|
object |
No |
The alert notification channels. |
||
| Severity |
string |
No |
The severity level. Valid values:
|
Warning |
| Channels |
array |
No |
The notification channel. Valid values:
|
|
|
string |
No |
The notification channel. Valid values:
|
Ding |
|
| NotificationReceivers |
array<object> |
No |
The alert notification receivers. |
|
|
object |
No |
The alert notification receivers. |
||
| ReceiverType |
string |
No |
The receiver type. Valid values: AliyunUid, DingToken, FeishuToken, and WebHookUrl. |
DingToken |
| ReceiverValues |
array |
No |
The receiver values.
|
|
|
string |
No |
The receiver values.
|
token1 |
|
| MuteInterval |
integer |
No |
The alert mute interval. Unit: minutes. Default value: 5. |
5 |
InhibitionInterval
deprecated
|
integer |
No |
[Deprecated] Use the MuteInterval parameter instead. |
5 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Id |
integer |
The ID of the alert rule. |
1 |
| RequestId |
string |
The request ID. Used for locating logs and troubleshooting issues. |
C636A747-7E4E-594D-94CD-2B**** |
DIAlarmRuleId
deprecated
|
string |
[Deprecated] Use the Id parameter instead. |
1 |
Examples
Success response
JSON format
{
"Id": 1,
"RequestId": "C636A747-7E4E-594D-94CD-2B****",
"DIAlarmRuleId": "1"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.