You can call this operation to modify a workflow.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyFlow

The operation that you want to perform. Set this parameter to ModifyFlow.

Id String Yes F-7A39731FE719****

The ID of the workflow.

ProjectId String Yes FP-3535FE0BE522****

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 alert configuration. Currently, the eventId parameter has the following values:

  • EMR-210401001: indicates the alert sent when the workflow failed.
  • EMR-110401002: indicates the notification sent when the workflow was successful.
  • EMR-110401015: indicates the alert sent when the workflow node failed.
AlertDingDingGroupBizId String No Deprecated

The deprecated field.

AlertUserGroupBizId String No Deprecated

The deprecated field.

Application String No {"nodeDefMap":{":start:":{"name":":start:","type":":start:","transitions":["cluster"]},"cluster":{"id":"CT-0C74281682CF03B4","name":"cluster","type":":Cluster:","transitions":["job1"]},"job1":{"jobId":"FJ-242AB240DBAF4195","name":"job1","type":":action:","transitions":["end"]},"end":{"name":"end","type":":end:"}}}

The construction information, represented by a nodeDefMap, of the workflow. The nodeDefMap consists of a group of nodes. The type and transitions parameters in a node are described as follows:

  • type: indicates the type of the node. Valid values: :start: (indicating a start node), :Cluster: (indicating a node for building an on-demand cluster), :action: (indicating an action node), and :end: (indicating an end node).
  • transitions: indicates the descendant node of the node.

Separate multiple nodes with commas (,).

ClusterId String No C-F32FB31D8295****

The ID of the cluster.

CreateCluster Boolean No false

Specifies whether to use a cluster template to create the cluster. If this parameter is set to true, a cluster template is used to create the cluster. In this case, set the ClusterId parameter to the ID (CT-xxx) of the cluster template. If this parameter is set to false, set the ClusterId parameter to the ID (C-xxx) of the existing cluster.

CronExpr String No 0 0 0-23/1 * * ?

The Cron expression used for configuring periodic scheduling. For more information, see Cron expression.

Description String No my flow description

The description of the workflow. The description can be up to 156 characters in length.

EndSchedule Long No 1542783967503

The end time of the schedule. The value is a timestamp of the Long type. You can run the System.currentTimeMillis() method to obtain the time.

HostName String No emr-header-1.cluster-12345

The name of the host where the workflow is running. The host can be a master node or gateway node. The format of the hostname is emr-header-1.cluster-12345. You can log on to the host and run the hostname command to check the hostname.

Name String No my_flow

The name of the workflow. The name can be up to 64 characters in length and must be unique in a project.

ParentCategory String No FC-FC396F988E07C06F

The ID of the parent directory. If this parameter is left empty, the root directory is used.

ParentFlowList String No F-62ECFC6E1BF6EAD2,F-1E6528634E67B615,F-7E0A84332E9D9A89

The ID list of ancestor workflows on which the workflow depends. Separate multiple IDs with commas (,).

Periodic Boolean No true

Specifies whether to enable periodic scheduling.

StartSchedule Long No 1542783867503

The start time of the schedule. The value is a timestamp of the Long type. You can run the System.currentTimeMillis() method to obtain the time. This parameter must meet the following requirements:

  • The value of this parameter must be smaller than that of the EndSchedule parameter.
  • This parameter is required if the CronExpr parameter is not left empty.
Status String No UNDER_SCHEDULE

The status of the workflow.

Response parameters

Parameter Type Example Description
Data Boolean true

The modification result. The value true indicates that the modification was successful, and false indicates that the modification failed.

RequestId String ECC2D0D1-B6D5-468D-B698-30E8805EB574

The ID of the request.

Examples

Sample request


http(s)://[Endpoint]/? Action=ModifyFlow
&Id=F-7A39731FE719****
&ProjectId=FP-3535FE0BE522****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success response

XML format

<ModifyFlowResponse>
	  <RequestId>ECC2D0D1-B6D5-468D-B698-30E8805EB574</RequestId>
	  <Data>true</Data>
</ModifyFlowResponse>

JSON format

{
	"Data":true,
	"RequestId":"ECC2D0D1-B6D5-468D-B698-30E8805EB574"
}

Error codes

For more information about error codes, see API Error Center.