All Products
Search
Document Center

DataWorks:CreateAlertRule

Last Updated:Jun 11, 2026

Membuat aturan peringatan pemantauan kustom.

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

Name

string

Yes

Nama aturan.

xm_create_test

Owner

string

Yes

ID akun Alibaba Cloud yang digunakan oleh pemilik aturan.

279114181716147735

Enabled

boolean

Yes

Apakah aturan diaktifkan.

true

TriggerCondition

object

Yes

Kondisi pemicu peringatan.

Type

string

No

The alert type. Valid values:

  • Finished: An instance is successfully run.

  • UnFinished: An instance does not finish running before a specified point in time.

  • Error: An error occurs on an instance.

  • CycleUnfinished: An instance does not finish running as expected within a specific cycle.

  • Timeout: An instance times out.

  • InstanceTransferComplete: An instance is generated by the auto triggered node.

  • InstanceTransferFluctuate: The number of generated instances fluctuates.

  • ExhaustedError: An error persists after an instance is automatically rerun.

  • InstanceKeyword: An instance with errors contains specified keywords.

  • InstanceErrorCount: The number of instances on which an error occurs reaches a specified threshold.

  • InstanceErrorPercentage: The proportion of instances on which an error occurs in the workspace to the total number of instances reaches a specified threshold.

  • ResourceGroupPercentage: The usage rate of the resource group reaches a specified threshold.

  • ResourceGroupWaitCount: The number of instances that are waiting for resources in the resource group reaches a specified threshold.

Error

Extension

object

No

The extended information about the rule. This parameter is required for specific types of alerts.

Error

object

No

The configuration for an alert of the Error type.

StreamTaskIds

array

No

The IDs of the real-time computing tasks. This parameter is required when you monitor real-time computing tasks.

integer

No

The ID of the real-time computing task.

123

AutoRerunAlertEnabled

boolean

No

Specifies whether to trigger an alert if a batch synchronization task is automatically rerun upon a failure.

false

Timeout

object

No

The configuration for an alert of the Timeout type.

TimeoutInMinutes

integer

No

The timeout period. Unit: minutes. Valid values: [1, 21600].

10

UnFinished

object

No

The configuration for an alert of the UnFinished type.

UnFinishedTime

string

No

The latest completion time of the instance. The period is in the hh:mm format. Valid values of hh: [0,47]. Valid values of mm: [0,59].

30:00

CycleUnfinished

object

No

The configuration for an alert of the CycleUnfinished type.

CycleAndTime

array<object>

No

The configurations of the scheduling cycle and timeout period of the instance.

object

No

CycleId

integer

No

The ID of the scheduling cycle of the instance. Valid values: [1,288].

1

Time

string

No

The latest completion time of the instance within the scheduling cycle. The time is in the hh:mm format. Valid values of hh: [0,47]. Valid values of mm: [0,59].

12:00

InstanceErrorCount

object

No

The configuration for an alert of the InstanceErrorCount type.

Count

integer

No

The maximum number of instances on which an error occurs. Valid values: [1,10000].

5

InstanceErrorPercentage

object

No

The configuration for an alert of the InstanceErrorPercentage type.

Percentage

integer

No

The maximum percentage of instances on which an error occurs in the workspace to the total number of instances. Valid values: [1-100].

5

InstanceTransferFluctuate

object

No

The configuration for an alert of the InstanceTransferFluctuate type.

Trend

string

No

The way in which the number of auto triggered node instances that are generated in your workspace fluctuates. Valid values:

  • abs: the absolute value. The number of instances increases or decreases.

  • increase: The number of instances increases.

  • decrease: The number of instances decreases.

abs

Percentage

integer

No

The maximum percentage of fluctuation in the number of auto triggered node instances that are generated in your workspace. Valid values: [1-100].

10

Target

object

No

The monitored objects.

Type

string

No

The type of the monitored objects. Valid values:

  • Task: node

  • Baseline: baseline

  • Project: workspace

  • BizProcess: workflow

Task

Ids

array

No

The IDs of monitored objects.

integer

No

The ID of the monitored object.

123123

AllowTasks

array

No

The nodes that are not to be monitored.

integer

No

The ID of the node that is not to be monitored.

123

Notification

object

No

Konfigurasi Pemberitahuan peringatan.

SilenceStartTime

string

No

The start time for silence. The time is in the HH:mm format.

00:00:00

SilenceEndTime

string

No

The end time for silence. The time is in the HH:mm format.

00:00:00

IntervalInMinutes

integer

No

The interval at which an alert notification is sent. Unit: minutes. Valid values: [5,10000].

30

Maximum

integer

No

The maximum number of times an alert notification can be sent within a calendar day. Valid values: [1, 10000].

3

Channels

array

Yes

The alert notification channels.

string

No

The alert notification channel. Valid values:

  • Mail

  • Phone

  • Sms: text message

  • Dingding: DingTalk

  • Feishu: Lark

  • Weixin: WeCom

  • Webhook: custom webhook

Sms

Receivers

array<object>

Yes

The alert recipients.

object

No

ReceiverType

string

No

The type of the alert recipient. Valid valves:

  • AliUid: Alibaba Cloud account ID.

  • Shift Schedules: the personnel in a shift schedule.

  • TaskOwner: the task owner. The task owner can receive custom alerts and event alerts.

  • Owner: the baseline owner. The baseline owner can receive baseline alerts.

  • WebhookUrl: URL of a custom webhook.

  • DingdingUrl: DingTalk webhook URL.

  • FeishuUrl: Lark webhook URL.

  • WeixinUrl: WeCom webhook URL.

TaskOwner

ReceiverValues

array

No

The ID of the alert recipient.

string

No

The ID of the alert recipient. If the ReceiverType parameter is set to AliUid, set this parameter to an Alibaba Cloud account ID. If the ReceiverType parameter is set to ShiftSchedule, set this parameter to a shift schedule ID. If the ReceiverType parameter is set to WebhookUrl, DingdingUrl, FeishuUrl, or WeixinUrl, set this parameter to a corresponding URL.

123123123

Extension

string

No

The additional configuration of the alert recipient. If the ReceiverType parameter is set to DingdingUrl, you can set this parameter to {"atAll":true} to remind all members in a DingTalk group.

{"atAll":true}

Elemen respons

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

A6C6B486-E3A2-5D52-9E76-D9380485D946

Id

integer

The rule ID.

123123

Contoh

Respons sukses

JSONformat

{
  "RequestId": "A6C6B486-E3A2-5D52-9E76-D9380485D946\n",
  "Id": 123123
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.