You can call the ModifyFlow operation to modify a workflow.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyFlow

The operation that you want to perform. This parameter is required for API requests that you create by piecing together HTTP or HTTPS URLs. Set this parameter to ModifyFlow.

Id String Yes F-7A39731FE719****

The ID of the workflow. You can call ListFlowInstance View the workflow ID.

ProjectId String Yes FP-3535FE0BE522****

The ID of the project. You can call ListFlowProject View the ID of the project.

RegionId String Yes cn-hangzhou

The region ID of the instance. You can call DescribeRegions To view the latest list of Alibaba Cloud regions.

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.

Status String No UNDER_SCHEDULE

The status of the workflow.

Description String No my flow description

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

Periodic Boolean No true

Specifies whether to enable periodic scheduling.

StartSchedule Long No 1542783867503

The start time. It is a long integer timestamp. For example, System.currentTimeMillis () . 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.
EndSchedule Long No 1542783967503

Scheduling failure time, long integer timestamp, for example, System.currentTimeMillis () .

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

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

CreateCluster Boolean No false

Indicates whether the cluster was created from the cluster template.

  • If this parameter is set to true, the id of the cluster is the id CT-XXXXXX of the cluster template.
  • If this parameter is set to false, the id of the cluster is the id C- XXXXXX of the cluster.
ClusterId String No C-F32FB31D8295****

The ID of the cluster.

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 Hostname is emr-header-1.cluster-12345 , you can log on to the machine to use hostname Command to view the corresponding value.

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 structure of the workflow, represented by nodeDefMap. The nodeDefMap consists of a group of nodes. Separate multiple tags with commas (,).

  • type : the type can be start node (:start :), build on demand Cluster node (:Cluster :), action node (:action :), and end node (:end :).
  • transitions : a downstream node.
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 notification configuration. eventId currently supports:

  • EMR-210401001 Alert upon workflow failure
  • EMR-110401002 (Notification of workflow success)
  • EMR-110401015 (Workflow node failure alarm)
AlertUserGroupBizId String No Deprecated

This parameter is unavailable.

AlertDingDingGroupBizId String No Deprecated

This parameter is unavailable.

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 (,).

ParentCategory String No FC-FC396F988E07C06F

The ID of the parent directory. If this parameter is empty, the default value is the root directory.

Response parameters

Parameter Type Example Description
Data Boolean true

Returned results

  • true: indicates that the modification was successful.
  • false: indicates that the modification has failed.
RequestId String ECC2D0D1-B6D5-468D-B698-30E8805EB574

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

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

JSON Syntax

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

Error code

The port number of a client that accesses a Error CenterFor more information, see error codes.