UpdateRemind

Updated at:

Updates a custom monitoring rule.

Operation description

DataWorks Basic Edition and higher editions are supported.

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

RemindId

integer

Yes

The ID of the custom rule.

1234

RemindName

string

No

The name of the custom rule. The name cannot exceed 128 characters in length.

update_remindname

DndEnd

string

No

The end time of the do-not-disturb period, before which no alerts are sent. Specify the time in the hh:mm format. Valid values for hh: [0,23]. Valid values for mm: [0,59].

08:00

RemindUnit

string

No

The type of the monitored object. Valid values:

  • NODE: node

  • BASELINE: baseline

  • PROJECT: workspace

  • BIZPROCESS: workflow

Valid values:

  • BASELINE :

    Baseline.

  • PROJECT :

    Workspace.

  • NODE :

    Node.

  • BIZPROCESS :

    Workflow.

NODE

NodeIds

string

No

The node IDs when the monitored object is a node. A single monitoring rule can monitor up to 50 nodes. Separate multiple node IDs with commas (,). This parameter takes effect only when the RemindUnit parameter is set to NODE.

1,2,3

BaselineIds

string

No

The baseline IDs when the monitored object is a baseline. A single monitoring rule can monitor up to 5 baselines. Separate multiple baseline IDs with commas (,). This parameter takes effect only when the RemindUnit parameter is set to BASELINE.

1,2,3

ProjectId

integer

No

The workspace ID when the monitored object is a workspace. A single monitoring rule can monitor only one workspace. This parameter takes effect only when the RemindUnit parameter is set to PROJECT.

1234

BizProcessIds

string

No

The workflow IDs when the monitored object is a workflow. A single monitoring rule can monitor up to 5 workflows. Separate multiple workflow IDs with commas (,). This parameter takes effect only when the RemindUnit parameter is set to BIZPROCESS.

1,2,3

RemindType

string

No

The condition that triggers the alert rule. Valid values:

  • FINISHED: The system sends an alert when the task runs successfully. The monitoring starts from the time when the instance starts to run.

  • UNFINISHED: The system sends an alert if the task is still running at the specified time. The monitoring starts from the time when the instance starts to run.

  • ERROR: The system sends an alert when an error occurs during the running of the task. The monitoring starts from the time when the instance starts to run.

  • CYCLE_UNFINISHED: The system sends an alert if the instance is still running within the specified cycle. This value is typically used to monitor instances that run on an hourly cycle.

  • TIMEOUT: The system sends an alert if the task is still running after the specified running duration. The monitoring starts from the time when the instance starts to run. This value is typically used to monitor the running duration of instances.

For more information about the conditions that trigger alert rules, see Custom rules.

Valid values:

  • UNFINISHED :

    Unfinished.

  • EXHAUSTED_ERROR :

    Error after automatic reruns.

  • CYCLE_UNFINISHED :

    Cycle unfinished.

  • ERROR :

    Error.

  • TIMEOUT :

    Timeout.

  • FINISHED :

    Finished.

FINISHED

MaxAlertTimes

integer

No

The maximum number of alerts. Valid values: [1,10]. Default value: 3.

3

AlertInterval

integer

No

The alert interval. Unit: seconds. Minimum value: 1200. Default value: 1800.

1800

Detail

string

No

The parameter settings for different trigger conditions are as follows:

  • If the RemindType (trigger condition) is set to FINISHED, leave the current parameter settings empty.

  • If the RemindType (trigger condition) is set to UNFINISHED, the configuration format example of the current parameter settings is {"hour":23,"minu":59}. Valid values for hour: [0,47]. Valid values for minu: [0,59].

  • If the RemindType (trigger condition) is set to ERROR, leave the current parameter settings empty.

  • If the RemindType (trigger condition) is set to CYCLE_UNFINISHED, the configuration format example of the current parameter settings is {"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 key of the JSON string is the cycle number, and the valid values are [1,288]. The value is the unfinished time corresponding to the cycle, in the hh:mm format. Valid values for hh: [0,47]. Valid values for mm: [0,59].

  • If the RemindType (trigger condition) is set to TIMEOUT, the configuration format example of the current parameter settings is 1800, in seconds. This means that an alert is triggered if the instance runs for more than 30 minutes after it starts.

{"hour":23,"minu":59}

AlertUnit

string

No

The recipients of the alert. Valid values: OWNER (task owner) and OTHER (specified users).

Valid values:

  • OTHER :

    Specified users.

  • OWNER :

    Task owner.

OWNER

AlertMethods

string

No

The notification methods for the alert. Valid values:

  • MAIL: email

  • SMS: text message

  • PHONE: phone call. This method is supported only in DataWorks Professional Edition and higher editions.

  • DINGROBOTS: DingTalk chatbot. This method takes effect only after the RobotUrls parameter is configured.

  • Webhooks: WeCom or Lark chatbot. This method takes effect only after the Webhooks parameter is configured.

Separate multiple notification methods with commas (,).

SMS,MAIL

AlertTargets

string

No

The parameter settings for different alert recipients:

  • If AlertUnit is set to OWNER (node task owner), leave this parameter empty.

  • If AlertUnit is set to OTHER (specified users), specify their Alibaba Cloud UIDs. Separate multiple UIDs with commas (,). You can specify up to 10 users to receive alerts.

9527952795279527

UseFlag

boolean

No

Specifies whether to enable the alert rule. Valid values:

  • true: The alert rule is enabled.

  • false: The alert rule is disabled.

true

RobotUrls

string

No

The webhook URLs of the DingTalk group chatbot. Separate multiple webhook URLs with commas (,). If the parameter settings are set to undefined, the system clears the webhook URLs of the DingTalk chatbot.

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

Webhooks

string

No

The webhook URLs of the WeCom or Lark chatbot. Separate multiple webhook URLs with commas (,). The AlertMethods parameter must include the WEBHOOKS alerting method. If the parameter settings are set to undefined, the system clears the webhook URLs.

This parameter is supported only in DataWorks Enterprise Edition. Available regions: China (Shanghai), China (Chengdu), China (Zhangjiakou), China (Beijing), China (Hangzhou), China (Shenzhen), China (Hong Kong), Germany (Frankfurt), and Singapore.

https://open.feishu.cn/open-apis/bot/v2/hook/*******

Response elements

Element

Type

Description

Example

object

The response structure.

HttpStatusCode

integer

The HTTP status code.

200

Data

boolean

The result of updating the custom monitoring rule.

true

ErrorMessage

string

The error message.

The specified parameters are invalid.

RequestId

string

The unique ID of the request. You can use the ID to troubleshoot issues when an error occurs.

0000-ABCD-EFG****

Success

boolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request fails.

true

ErrorCode

string

The error code.

1031203110005

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

500 Forbidden.Not.Server The dataworksAPI service is not available in this area. Please try it in another area.
500 Forbidden.Wkbench.BaselineNoPermission You are not authorized to access the baseline.
500 Forbidden.Wkbench.ProjectNoPermission You are not authorized to access the workspace.
500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
500 Forbidden.Wkbench.RemindNoPermission You are not authorized to modify the reminder.
500 Invalid.Wkbench.RemindNotExist The reminder does not exist.
429 Throttling.Api The request for this resource has exceeded your available limit.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit.
429 Throttling.Resource You have reached the limit for the resource. Please contact us by submitting a ticket.
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.