Updates a custom alarm rule.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Required UpdateRemind

The operation that you want to perform.

AlertInterval Integer Yes 1800

The minimum alert interval. Unit: seconds. The minimum value is 1200 and the default value is 1800.

RegionId String Required cn-shanghai

The unique identifier of the zone.

RemindId Long Yes 1234

The ID of the custom monitoring rule.

RemindName String No update_remindname

The name of the rule. The name must be 1 to 128 characters in length.

DndEnd String No 08:00

The skip end time. The time is in the hh:mm format. The value range of hh is [0,23]. The value range of mm is [0,59].

RemindUnit String No NODE

The type of the object. Valid values: NODE, BASELINE, PROJECT, and workflow.

NodeIds String No 1,2,3

The ID of the task NODE to be monitored when the summarunit parameter is set to NODE. Separate multiple IDs with commas (,). A rule can monitor up to 50 nodes.

BaselineIds String No 1,2,3

The ID of the BASELINE to monitor when the value of the credunit parameter is BASELINE. Separate multiple IDs with commas (,). A rule monitors up to five baselines.

ProjectId Long No 1234

The ID of the workspace to be monitored when the value of the mindunit (object type) parameter is PROJECT. A rule can only monitor one workspace.

BizProcessIds String No 1,2,3

The number of workflow to be monitored when workflow is set to BIZPROCESS (ID.). Separate multiple IDs with commas (,). A rule can contain up to five workflow.

RemindType String No FINISHED

The trigger condition, including FINISHED, UNFINISHED, ERROR, CYCLE_UNFINISHED, and TIMEOUT.

MaxAlertTimes Integer No 3

Maximum number of alarms. Valid values: 1 and 10. Default value: 3.

Detail String No {"hour":23,"minu":59}

The different trigger conditions are described as follows:

  • When mindtype is set to FINISHED, this parameter is required.
  • When the mindtype parameter is set to UNFINISHED, the format of the input parameter is {"hour":23,"minu":59}. The value range of hour is [0,47] and the value range of minu is [0,59].
  • This function does not need to be passed in when the value of the mindtype parameter is ERROR.
  • When the operator type is set to CYCLE_UNFINISHED (the cycle is not completed), the input parameter is in the following format: {"1":"05:50","2":"06:50","3":"07:50","4":"08:50","5":"09:50","6":"10:50","7":"11:50","8":"12:50","9":"13:50","10":"14:50","11":"15:50","12":"16:50","13":"17:50","14":"18:50","15":"19:50","16":"20:50","17":"21:50","18":"22:50","19":"23:50","20":"24:50","21":"25:50"}. The value of key in the JSON string indicates the period, in the range of [1,288]. The value is the time when the time is not completed in the cycle, in the format of hh:mm. The value range of hh is [0,47], and the value range of mm is [0,59].
  • When the number of seconds for the action type is set to TIMEOUT, the format of the input parameter is 1800. Unit: seconds. After running, an alert is triggered for more than 30 minutes.
AlertUnit String No OWNER

The granularity of the object that is used to receive alerts. Valid values: OWNER and OTHER.

AlertMethods String No SMS,MAIL

The alert method. Valid values: MAIL, SMS, and PHONE. PHONE number: DataWorks Professional Edition and later. Separate multiple notification methods with commas (,).

AlertTargets String No 9527952795279527
  • When AlertUnit is the OWNER, this parameter is empty.
  • The Alibaba Cloud UID of the specified user. This parameter is required when the alert recipient value of the alert unit parameter is OTHER. Separate multiple Alibaba Cloud UIDs with commas (,). You can enter a maximum of 10 Alibaba Cloud UIDs.
UseFlag Boolean No true

Specifies whether to enable or disable the rule. Valid values: true and false.

RobotUrls String No https://oapi.dingtalk.com/robot/send?access_token=******************************

DingTalk the webhook address of the chatbot. Separate multiple webhook addresses with commas (,).

Response parameters

Parameter Type Example Description
Data Boolean true

Indicates whether the update of the custom monitoring rule succeeds. Valid values: true and false.

ErrorCode String 1031203110005

The error code.

ErrorMessage String The specified parameters are invalid.

The returned message.

HttpStatusCode Integer 200

The HTTP status code.

RequestId String 0000-ABCD-EFG****

The unique ID of the call. You can use the error ID to troubleshoot the error.

Success Boolean true

Indicates whether the call is successful.

Examples

Sample requests

http(s)://[Endpoint]/? Action=UpdateRemind
&AlertInterval=1800
&RegionId=cn-shanghai
&RemindId=1234
&<Common request parameters>

Sample success responses

XML format

<RequestId>0000-ABCD-EFG****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>true</Data>
<ErrorCode>1031203110005</ErrorCode>
<ErrorMessage>The specified parameters are invalid. </ErrorMessage>
<Success>true</Success>

JSON format

{
    "RequestId": "0000-ABCD-EFG****",
    "HttpStatusCode": 200,
    "Data": true,
    "ErrorCode": 1031203110005,
    "ErrorMessage": "The specified parameters are invalid.",
    "Success": true
}

Error code

HttpCode Error code Error message Description
403 Forbidden.Access Access is forbidden. Activate DataWorks first. Your access is restricted, possibly because you have not activated DataWorks.
500 Forbidden.Not.Server The dataworksAPI service is not available in this area. Please try it in another area. DataWorks API service is not available in this region. Please try another region.
500 Forbidden.Wkbench.BaselineNoPermission You are not authorized to access the baseline. No baseline permissions exist.
500 Forbidden.Wkbench.ProjectNoPermission You are not authorized to access the workspace. You have no permission to use a workspace.
500 InternalError.System An internal system error occurred. Try again later. An internal system error occurred. Please try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. An internal system error occurred. Please try again later.
500 Invalid.Wkbench.Parameter The specified parameters are invalid. The parameters are invalid.
403 ResourceNotAuthorized.Api You are not authorized to access the resources. You cannot access resources without authorization.
429 Throttling.Api The request for this resource has exceeded your available limit. The request for the resource exceeds your available upper limit.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit. The request for the resource has exceeded your daily availability limit.
429 Throttling.Resource You have reached the limit for the resource. Please contact us by submitting a ticket. The number of resources has reached the upper limit. Submit a ticket.
429 Throttling.System The DataWorks system is busy. Try again later. DataWorks the system is busy, please try again later.
429 Throttling.User Your request is too frequent. Try again later. Your request is too frequent, please try to slow down the request speed.
500 Forbidden.Wkbench.RemindNoPermission You are not authorized to modify the reminder. You do not have the permission to modify the custom notification rule.
500 Invalid.Wkbench.RemindNotExist The reminder does not exist. The custom reminder rule does not exist.

For a list of error codes, visit the API Error Center.