All Products
Search
Document Center

DataWorks:CreateDIAlarmRule

Last Updated:Aug 18, 2026

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

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

Description

string

No

The description of the alert rule.

Alert description

MetricType

string

Yes

The alert metric type. Valid values:

  • Heartbeat: task status alert.

  • FailoverCount: failover count alert.

  • Delay: task latency alert.

  • DdlReport: DDL notification.

  • ResourceUtilization: resource group utilization.

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

  • Critical

Warning

Duration

integer

No

The time window for alert calculation. Unit: minutes.

10

Threshold

integer

No

The alert threshold.

  • Task status alert: no threshold is required.

  • Failover count alert: the threshold is the number of failovers.

  • Task latency alert: the threshold is the latency duration. Unit: seconds.

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: add a column.

  • AlterDropColumn: drop a column.

  • AlterRenameColumn: rename a column.

  • AlterRenameTable: rename a table.

  • AlterTableModify: other table modifications.

  • DropTable: drop a table.

  • TruncateTable: truncate a table.

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

  • Critical

Warning

Channels

array

No

The notification channel. Valid values:

  • Mail: email.

  • Phone: phone call.

  • Sms: text message.

  • Ding: DingTalk.

string

No

The notification channel. Valid values:

  • Mail: email.

  • Phone: phone call.

  • Sms: text message.

  • Ding: DingTalk.

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.

  • If the receiver type is AliyunUid, the value is the Alibaba Cloud account ID.

  • If the receiver type is DingToken, the value is the DingTalk token.

string

No

The receiver values.

  • If the receiver type is AliyunUid, the value is the Alibaba Cloud account ID.

  • If the receiver type is DingToken, the value is the DingTalk token.

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.