CreateDIAlarmRule

Updated at:

Creates an alert rule for a task in the new version of Data Integration. Supported tasks include real-time synchronization of an entire MySQL database to Hologres.

Operation description

You can configure alert rules when the task synchronization type 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. This is the ID of the task associated with the alert rule.

11265

Description

string

No

The description.

mysql synchronizes to hologres heartbeat alert

MetricType

string

Yes

The alert metric type. Valid values:

  • Heartbeat (task status alert)

  • FailoverCount (failover count alert)

  • Delay (task latency alert)

Heartbeat

TriggerConditions

array<object>

Yes

The list of alert trigger conditions. Multiple conditions are supported.

object

No

The alert trigger condition.

Severity

string

No

The severity level. Valid values:

  • Warning

  • Critical

Warning

Duration

integer

No

The time interval for alert calculation, in minutes.

15

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.

5

NotificationSettings

object

Yes

The alert notification settings.

NotificationChannels

array<object>

Yes

The alert notification channels. Multiple values are supported.

object

No

The alert notification channel.

Severity

string

No

The severity level. Valid values:

  • Warning

  • Critical

Warning

Channels

array

No

The list of channels.

string

No

The channel. Valid values:

  • Mail (email)

  • Phone (phone call)

  • Sms (text message)

  • Ding (DingTalk)

Ding

NotificationReceivers

array<object>

Yes

The alert notification recipients. Multiple values are supported.

object

No

The alert notification recipient.

ReceiverType

string

No

The recipient type.

  • When the alert notification channel is email, phone call, or text message, set the recipient type to Alibaba Cloud user ID (AliyunUid).

  • When the alert notification channel is DingTalk, set the recipient type to DingTalk token (DingToken).

DingToken

ReceiverValues

array

No

The list of recipient values.

string

No

The recipient value.

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

  • When the recipient type is DingTalk token, the recipient value is the specific DingTalk token.

token1

InhibitionInterval

integer

No

The alert inhibition interval, in minutes. Default value: 5.

5

Enabled

boolean

No

Specifies whether the alert rule is enabled. Default value: false.

true

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

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

DIAlarmRuleId

integer

The ID of the alert rule.

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