CreateDIAlarmRule
Creates a Data Integration alert rule.
Operation description
DataWorks Basic Edition or a higher edition is required.
Before you begin
Use ListDIJobs to query the target workspace and obtain the ID of an existing synchronization task from PagingInfo.DIJobs[].Id. Then, specify the ID in DIJobId. The target task must be a new-version Data Integration task that supports alerting. Some offline synchronization channels do not support alert creation.
To create a synchronization task, use ListProjects to query the workspace ID, and configure an available resource group for the task according to the resource settings required by CreateDIJob. After the task is created, use the Id in the response as DIJobId.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Description |
string |
No |
The description. |
Alert description |
| MetricType |
string |
Yes |
The alert metric type. Valid values:
|
Heartbeat |
| Enabled |
boolean |
No |
Specifies whether the alert rule is enabled. By default, the alert rule is disabled. |
true |
| DIJobId |
integer |
Yes |
The ID of the task with which the alert rule is associated. |
1 |
| ClientToken |
string |
No |
The idempotency token. |
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 interval for alert calculation, in minutes. |
10 |
| Threshold |
integer |
No |
The alert threshold.
|
10 |
| DdlTypes |
array |
No |
The list of DDL operations to take effect. This parameter takes effect only when DDL notifications are enabled. |
|
|
string |
No |
The list of DDL operations to 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 recipients. |
|
|
object |
No |
The alert notification recipients. |
||
| ReceiverType |
string |
No |
The recipient type. Valid values: AliyunUid, DingToken, FeishuToken, and WebHookUrl. |
DingToken |
| ReceiverValues |
array |
No |
The recipient value.
|
|
|
string |
No |
The recipient value.
|
token1 |
|
| MuteInterval |
integer |
No |
The alert mute interval, in 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 ID of the request. You can use the ID to locate logs and troubleshoot issues. |
C636A747-7E4E-594D-94CD-2B**** |
DIAlarmRuleId
deprecated
|
string |
[Deprecated] Use the Id field 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.