Updates an alert rule for a Data Integration task of a new version. Only the following type of task is supported: real-time data synchronization from a MySQL database to Hologres.
You can configure alert rules only for tasks whose MigrationType is set to RealtimeIncremental.
You must update all fields in the alert rule.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | UpdateDIAlarmRule | The operation that you want to perform. Set the value to UpdateDIAlarmRule. |
DIAlarmRuleId | Long | Yes | 34982 | The alert rule ID. |
Description | String | No | Alert rule for heartbeat of data synchronization from MySQL to Hologres | The description of the alert rule. |
MetricType | String | Yes | Heartbeat | The metric type in the alert rule. |
TriggerConditions | Array | Yes | The conditions that can trigger the alert rule. |
|
Severity | String | No | Warning | The severity level. |
Duration | Long | No | 15 | The time interval for alert calculation. Unit: minutes. |
Threshold | Long | No | 5 | The alert threshold.
|
NotificationSettings | Object | Yes | The alert notification settings. |
|
NotificationChannels | Array | Yes | The alert notification methods. |
|
Severity | String | No | Warning | The severity level. |
Channels | Array of String | No | Ding | The method. |
NotificationReceivers | Array | Yes | The alert notification recipients. |
|
ReceiverType | String | No | DingToken | The recipient type.
|
ReceiverValues | Array of String | No | token1 | The recipient.
|
InhibitionInterval | Integer | No | 5 | The duration of the alert suppression interval. Default value: 5. Unit: minutes. |
Enabled | Boolean | No | true | Specifies whether to enable the alert rule. By default, the alert rule is disabled. |
Response parameters
Parameter |
Type |
Example |
Description |
RequestId | String | A6C6B486-E3A2-5D52-9E76-D9380485D946 | The request ID. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=UpdateDIAlarmRule
&DIAlarmRuleId=34982
&Description=Alert rule for heartbeat of data synchronization from MySQL to Hologres
&MetricType=Heartbeat
&TriggerConditions=[{"Severity":"Warning","Duration":15,"Threshold":5}]
&NotificationSettings={"NotificationChannels":[{"Severity":"Warning","Channels":["Ding"]}],"NotificationReceivers":[{"ReceiverType":"DingToken","ReceiverValues":["token1"]}],"InhibitionInterval":5}
&Enabled=true
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateDIAlarmRuleResponse>
<RequestId>A6C6B486-E3A2-5D52-9E76-D9380485D946</RequestId>
</UpdateDIAlarmRuleResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "A6C6B486-E3A2-5D52-9E76-D9380485D946"
}
Error codes
HTTP status code |
Error code |
Error message |
Description |
429 | Throttling.Api | The request for this resource has exceeded your available limit. | The number of requests for the resource has exceeded the upper limit. |
429 | Throttling.System | The DataWorks system is busy. Try again later. | The DataWorks system is busy. Try again later. |
429 | Throttling.User | Your request is too frequent. Try again later. | Excessive requests have been submitted within a short period of time. Try again later. |
500 | InternalError.System | An internal system error occurred. Try again later. | An internal error has occurred. Try again later. |
500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | An internal error has occurred. Try again later. |
For a list of error codes, see Service error codes.