UpdateDIAlarmRule

Updated at:

Updates an alert rule configured for a synchronization task.

Operation description

You must purchase DataWorks Basic Edition or a higher edition to use this operation.

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

Id

integer

No

The alert rule Id

34982

Description

string

No

The description of the alert rule.

The description of the alert rule.

MetricType

string

No

The metric type in the alert rule. 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

No

The ID of the synchronization task.

1

TriggerConditions

array<object>

No

The conditions that can trigger the alert rule.

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.

15

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.

5

DdlTypes

array

No

The types of DDL operations for which the alert rule takes effect. This setting takes effect only for DDL notifications.

string

No

The type of the DDL operation for which the alert rule takes effect. This parameter is returned only if the MetricType parameter 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: empty a table

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

No

The alert notification settings.

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

  • Phone: phone call

  • Sms: SMS

  • Ding: DingTalk

string

No

The alert notification method. Valid values:

  • Mail: email

  • Phone: phone call

  • Sms: SMS

  • Ding: DingTalk

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

Name

string

No

The name of the alert rule.

alarm_rule_name

DIAlarmRuleId deprecated

integer

No

This parameter is deprecated. Use the Id parameter instead.

34982

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID. You can use the ID to query logs and troubleshoot issues.

A6C6B486-E3A2-5D52-9E76-D9380485D946

Success

boolean

Indicates whether the request was successful. Valid values:

  • true

  • false

true

Examples

Success response

JSON format

{
  "RequestId": "A6C6B486-E3A2-5D52-9E76-D9380485D946",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.