CreateDIAlarmRule

Updated at:

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

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.

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 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

  • Critical

Warning

Duration

integer

No

The time interval for alert calculation, in 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, in seconds.

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

  • AlterDropColumn: drop a column

  • AlterRenameColumn: rename a column

  • AlterRenameTable: rename a table

  • AlterTableModify: perform 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 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.

  • If the recipient type is AliyunUid, the value is the specific Alibaba Cloud user ID.

  • If the recipient type is DingToken, the value is the specific DingTalk token.

string

No

The recipient value.

  • If the recipient type is AliyunUid, the value is the specific Alibaba Cloud user ID.

  • If the recipient type is DingToken, the value is the specific DingTalk token.

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.