You can call this operation to modify the graphical information of a workflow.

Request parameters

Name Type Required Example Description
Id String Yes F-7A39731FE7196358 The ID of the workflow.
ProjectId String Yes FP-3535FE0BE5224A47 The ID of the project.
RegionId String Yes cn-hangzhou The ID of the region.
AlertConf String No {"items":[{"enable":true,"eventId":"EMR-210401001","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]},{"enable":true,"eventId":"EMR-110401015","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]},{"enable":true,"eventId":"EMR-110401002","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]}]} The configurations of the alerts and notifications. Valid values of the eventId property include EMR-210401001 (workflow failure), EMR-110401002 (workflow success), and EMR-110401015 (workflow node failure).
AlertDingDingGroupBizId String No This is a legacy parameter. The ID of the DingTalk group to send alerts.
AlertUserGroupBizId String No This is a legacy parameter. The ID of the user group to send alerts.
ClusterId String No A23BD131A862F184 The ID of the cluster.
CreateCluster Boolean No false Indicates whether the cluster is created using a cluster template. A value of true indicates that the cluster is created using a cluster template. The format of the cluster ID is CT-xxx. A value of false indicates that an existing cluster is used. The format of the cluster ID is C-xxx.
CronExpr String No 0 0 0-23/1 * * ? The cron expression of the periodic schedule. See A Cron Expressions.
Description String No This is a workflow description. The description of the workflow. Length constraints: Maximum length of 256.
EndSchedule Long No 1538018814000 The end time of the schedule (long timestamp). For example, the return value of the System.currentTimeMillis() method.
Graph String No {"nodes":[{"id":"48d474ea","index":0,"spmAnchorId":"0.0.0.i0.766645eb2cmNtQ","attribute":{"type":"START"},"shape":"startControlNode","type":"node","y":250,"size":"80*34","x":500},{"id":"7ba480b3","index":1,"spmAnchorId":"5176.8250060.0.i19.771e28d0IPNQGE","attribute":{"jobType":"SHELL","jobId":"FJ-7BE1062897B19D25","type":"JOB"},"config":{"hostName":""},"label":"fail_job","shape":"shellJobNode","type":"node","y":398.5,"size":"170*34","x":470.5},{"id":"33202d60","index":2,"spmAnchorId":"5176.8250060.0.i23.771e28d0IPNQGE","attribute":{"type":"END"},"shape":"endControlNode","type":"node","y":562.5,"size":"80*34","x":430.5}],"edges":[{"id":"28167ea0","index":3,"source":"48d474ea","sourceAnchor":0,"target":"7ba480b3","targetAnchor":0},{"id":"e8d5ff52","index":4,"source":"7ba480b3","sourceAnchor":1,"target":"33202d60","targetAnchor":0}]} The graphical information of the workflow.
HostName String No emr-header-1.cluster-123456 The information of the host on which the workflow is run.
Name String No my_flow The name of the workflow. Length constraints: Maximum length of 64. A workflow name is required to be unique for each project.
ParentCategory String No FC-F2495319DA05CEE5 The ID of the parent category.
ParentFlowList String No [F-123456] The list of the parent workflows.
Periodic Boolean No true Indicates whether the workflow is scheduled periodically.
StartSchedule Long No 1538017814000 The start time of the schedule (long timestamp). For example, the return value of the System.currentTimeMillis() method. 1. The value of StartSchedule is required to be smaller than the value of EndSchedule. This parameter is required to be specified when the value of CronExpr is not null.
Status String No STOP_SCHEDULE The status of the workflow. Valid values: STOP_SCHEDULE and UNDER_SCHEDULE.

Response parameters

Name Type Example Description
RequestId String 243D5A48-96A5-4C0C-8966-93CBF65635ED The ID of the request.
Data Boolean true Indicates whether the workflow is modified.

Examples

  • Sample requests
    /? Id=F-7A39731FE7196358
    &ProjectId=FP-257A173659F59685
    &RegionId=cn-hangzhou 
    &AlertConf={"items":[{"enable":true,"eventId":"EMR-210401001","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]},{"enable":true,"eventId":"EMR-110401015","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]},{"enable":true,"eventId":"EMR-110401002","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]}]}
    &ClusterId=A23BD131A862F184
    &CreateCluster=false
    &CronExpr=0 0 0-23/1 * * ?
    &Description="This is a workflow description."
    &EndSchedule=1538018814000
    &Graph={"nodes":[{"id":"48d474ea","index":0,"spmAnchorId":"0.0.0.i0.766645eb2cmNtQ","attribute":{"type":"START"},"shape":"startControlNode","type":"node","y":250,"size":"80*34","x":500},{"id":"7ba480b3","index":1,"spmAnchorId":"5176.8250060.0.i19.771e28d0IPNQGE","attribute":{"jobType":"SHELL","jobId":"FJ-7BE1062897B19D25","type":"JOB"},"config":{"hostName":""},"label":"fail_job","shape":"shellJobNode","type":"node","y":398.5,"size":"170*34","x":470.5},{"id":"33202d60","index":2,"spmAnchorId":"5176.8250060.0.i23.771e28d0IPNQGE","attribute":{"type":"END"},"shape":"endControlNode","type":"node","y":562.5,"size":"80*34","x":430.5}],"edges":[{"id":"28167ea0","index":3,"source":"48d474ea","sourceAnchor":0,"target":"7ba480b3","targetAnchor":0},{"id":"e8d5ff52","index":4,"source":"7ba480b3","sourceAnchor":1,"target":"33202d60","targetAnchor":0}]}
    &HostName=emr-header-1.cluster-123456
    &Name=my_flow
    &ParentCategory=FC-F2495319DA05CEE5
    &ParentFlowList=[F-123456]
    &Periodic=true
    &StartSchedule=1538017814000
    &Status=STOP_SCHEDULE
    &<Common request parameters>
  • Successful response examples
    JSON format
    {
    	"Data":true,
    	"RequestId":"ECC2D0D1-B6D5-468D-B698-30E8805EB574"
    }
  • Error response examples
    JSON format
    {
    	"code":"FLOW_API_FAILED",
    	"message":"Invalid type [INVALID_TYPE]",
    	"requestId":"11BAFBD8-8509-4177-A26D-407505E73713",
    	"successResponse":false
    }

Error codes

View error codes.