All Products
Search
Document Center

DataWorks:CreateDIAlarmRule

Last Updated:Jun 11, 2026

Membuat aturan peringatan untuk tugas sinkronisasi.

Deskripsi operasi

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

Description

string

No

Deskripsi aturan peringatan.

The description of the alert rule.

MetricType

string

Yes

Tipe data deret waktu dalam aturan peringatan. Nilai valid:

  • Heartbeat

  • FailoverCount

  • Delay

  • DdlReport

  • ResourceUtilization.

Heartbeat

Enabled

boolean

No

Apakah akan mengaktifkan aturan peringatan. Secara default, aturan peringatan dinonaktifkan.

true

DIJobId

integer

Yes

ID tugas sinkronisasi yang terkait dengan aturan peringatan.

1

ClientToken

string

No

Token klien yang digunakan untuk memastikan idempotensi permintaan.

ABFUOEUOTRTRJKE

Name

string

Yes

Nama aturan peringatan.

alartRule

TriggerConditions

array<object>

Yes

Kondisi yang dapat memicu aturan peringatan.

object

No

The condition that can trigger the alert rule.

Severity

string

No

The severity level. Valid values:

  • Warning

  • Critical

Warning

Duration

integer

No

The time interval for alert calculation. Unit: minutes.

10

Threshold

integer

No

The alert threshold.

  • If the alert rule is for task status, you do not need to specify a threshold.

  • If the alert rule is for failovers, you must specify the number of failovers.

  • If the alert rule is for latency, you must specify the latency duration, in seconds.

10

DdlTypes

array

No

The types of DDL operations for which the alert rule takes effect.

string

No

The type of the DDL operation for which the alert rule takes effect. This parameter is required only if the MetricType parameter is set to DdlReport. Valid values:

  • AlterAddColumn

  • AlterDropColumn

  • AlterRenameColumn

  • AlterRenameTable

  • AlterTableModify

  • DropTable

  • TruncateTable

AlterAddColumn

DdlReportTags deprecated

array

No

This parameter is deprecated and replaced by the DdlTypes parameter.

deprecated

string

No

This parameter is deprecated and replaced by the DdlTypes parameter.

ALTERADDCOLUMN

NotificationSettings

object

Yes

Pengaturan Pemberitahuan peringatan.

NotificationChannels

array<object>

No

The alert notification methods.

object

No

The alert notification method.

Severity

string

No

The severity level. Valid values:

  • Warning

  • Critical

Warning

Channels

array

No

The alert notification method. Valid values:

  • Mail

  • Phone

  • Sms

  • Ding

string

No

The alert notification method. Valid values:

  • Mail

  • Phone

  • Sms

  • Ding

Ding

NotificationReceivers

array<object>

No

The settings of alert notification recipients.

object

No

The settings of alert notification recipients.

ReceiverType

string

No

The recipient type. Valid values: AliyunUid, DingToken, FeishuToken, and WebHookUrl.

DingToken

ReceiverValues

array

No

The recipient.

  • If the ReceiverType parameter is set to AliyunUid, set this parameter to the Alibaba Cloud account ID of a user.

  • If the ReceiverType parameter is set to DingToken, set this parameter to the token of a DingTalk chatbot.

string

No

The recipient.

  • If the ReceiverType parameter is set to AliyunUid, set this parameter to the Alibaba Cloud account ID of a user.

  • If the ReceiverType parameter is set to DingToken, set this parameter to the token of a DingTalk chatbot.

token1

MuteInterval

integer

No

The duration of the alert suppression interval. Default value: 5. Unit: minutes.

5

InhibitionInterval deprecated

integer

No

This parameter is deprecated and replaced by the MuteInterval parameter.

5

Elemen respons

Element

Type

Description

Example

object

Schema of Response

Id

integer

The ID of the alert rule.

1

RequestId

string

The request ID. You can locate logs and troubleshoot issues based on the ID.

C636A747-7E4E-594D-94CD-2B4F8A9A9A63

DIAlarmRuleId deprecated

string

This parameter is deprecated and is replaced by the Id parameter.

1

Contoh

Respons sukses

JSONformat

{
  "Id": 1,
  "RequestId": "C636A747-7E4E-594D-94CD-2B****",
  "DIAlarmRuleId": "1"
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.