CreateDIAlarmRule

Updated at:

Creates an alert rule for a synchronization task.

Operation description

You can configure alert rules when your task includes real-time synchronization.

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

DIJobId

integer

Yes

The ID of the task to associate with the alert rule.

11265

Description

string

No

The description of the task.

mysql synchronizes to hologres heartbeat alert

MetricType

string

Yes

The metric type in the alert rule. Valid values:

  • Heartbeat

  • FailoverCount

  • Delay

Heartbeat

TriggerConditions

array<object>

Yes

The trigger conditions for the alert rule.

object

No

The trigger condition for 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, specify the number of failovers.

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

5

NotificationSettings

object

Yes

The alert notification settings.

NotificationChannels

array<object>

Yes

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

string

No

The alert notification method. Valid values:

  • Mail: email

  • Phone: phone call

  • Sms: text message

  • Ding: DingTalk chatbot token

Ding

NotificationReceivers

array<object>

Yes

The alert notification recipient settings.

object

No

An alert notification recipient setting.

ReceiverType

string

No

The recipient type. Valid values: AliyunUid and DingToken.

  • For Mail, Phone, or Sms notifications, set this parameter to AliyunUid (Alibaba Cloud account ID).

  • For Ding notifications, set this parameter to DingToken (DingTalk chatbot token).

DingToken

ReceiverValues

array

No

The recipients.

string

No

The recipient.

  • If ReceiverType is AliyunUid, specify the Alibaba Cloud account ID.

  • If ReceiverType is DingToken, specify the DingTalk chatbot token.

token1

InhibitionInterval

integer

No

The alert suppression interval. Default: 5. Unit: minutes.

5

Enabled

boolean

No

Specifies whether to enable the alert rule. Default: disabled.

true

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

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

DIAlarmRuleId

integer

The alert rule ID.

34988

Examples

Success response

JSON format

{
  "RequestId": "C636A747-7E4E-594D-94CD-2B4F8A9A9A63",
  "DIAlarmRuleId": 34988
}

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. No permission, please authorize
429 Throttling.Api The request for this resource has exceeded your available limit.
429 Throttling.System The DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.