調用ModifyFlowForWeb,修改工作流。

調試

您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。

請求參數

名稱 類型 是否必選 示例值 描述
Action String ModifyFlowForWeb

系統規定參數。取值:ModifyFlowForWeb

RegionId String cn-hangzhou

地域ID。

ProjectId String FP-257A173659F5****

項目ID。

Id String F-7A39731FE719****

工作流ID。

Name String my_flow

工作流名稱, 長度限制為64個字符,同一個項目中不允許重名。

Status String STOP_SCHEDULE

工作流狀態, 支持STOP_SCHEDULE和UNDER_SCHEDULE。

Description String 這是一個工作流描述

工作流描述,長度限制為256個字符。

Periodic Boolean true

是否周期調度。

StartSchedule Long 1538017814000

調度生效時間, 長整型時間戳。例如:System.currentTimeMillis()必須小于EndSchedule。當CronExpr不為空時, 此項必填。

EndSchedule Long 1538018814000

調度失效時間,長整型時間戳,例如:System.currentTimeMillis()。

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

時間周期調度的Cron表達式。

CreateCluster Boolean false

是否創建集群:

為true時,ClusterId為集群模板ID:CT-XXXXXX。

為false時,ClusterId為集群ID:C-XXXXXX。

ClusterId String C-F32FB31D8295****

集群ID。

HostName String emr-header-1.cluster-123456

指定運行的機器信息,格式為emr-header-1.cluster-123456。

Namespace String default

保留字段

Graph String {"nodes":[{"id":"48d474ea","attribute":{"type":"START"},"type":"node"},{"id":"59065ccd","label":"bep-test","attribute":{"jobId":"FJ-6B0706D041565649","type":"JOB","jobType":"SPARK"},"type":"node","config":{"hostName":"","clusterId":""}},{"id":"aa1557a6","attribute":{"type":"END"},"type":"node"},{"id":"29e683d7","label":"test","attribute":{"jobId":"FJ-A9E1B3AF5B5E28B3","type":"JOB","jobType":"SPARK"},"type":"node","config":{"hostName":"","clusterId":""}}],"edges":[{"sourceAnchor":0,"targetAnchor":0,"index":2,"source":"48d474ea","id":"1acb3290","target":"59065ccd"},{"sourceAnchor":1,"targetAnchor":0,"index":4,"source":"59065ccd","id":"ad0fdda5","target":"aa1557a6"}]}

工作流信息

AlertConf String {"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"]}]}

報警通知配置。

AlertUserGroupBizId String 已過期

保留字段

AlertDingDingGroupBizId String 已過期

保留字段

ParentFlowList String [F-123456]

依賴的父工作流列表。

ParentCategory String FC-F2495319DA05****

父目錄ID。

返回數據

名稱 類型 示例值 描述
Data Boolean true

返回執行結果,包含如下:

true:成功

false:失敗

RequestId String 243D5A48-96A5-4C0C-8966-93CBF65635ED

請求ID。

示例

請求示例

http(s)://[Endpoint]/?Action=ModifyFlowForWeb
&RegionId=cn-hangzhou
&ProjectId=FP-257A173659F5****
&Id=F-7A39731FE719****
&Name=my_flow
&Status=STOP_SCHEDULE
&Description=這是一個工作流描述
&Periodic=true
&StartSchedule=1538017814000
&EndSchedule=1538018814000
&CronExpr=0 0 0-23/1 * * ?
&CreateCluster=false
&ClusterId=C-F32FB31D8295****
&HostName=emr-header-1.cluster-123456
&Namespace=default
&Graph={"nodes":[{"id":"48d474ea","attribute":{"type":"START"},"type":"node"},{"id":"59065ccd","label":"bep-test","attribute":{"jobId":"FJ-6B0706D041565649","type":"JOB","jobType":"SPARK"},"type":"node","config":{"hostName":"","clusterId":""}},{"id":"aa1557a6","attribute":{"type":"END"},"type":"node"},{"id":"29e683d7","label":"test","attribute":{"jobId":"FJ-A9E1B3AF5B5E28B3","type":"JOB","jobType":"SPARK"},"type":"node","config":{"hostName":"","clusterId":""}}],"edges":[{"sourceAnchor":0,"targetAnchor":0,"index":2,"source":"48d474ea","id":"1acb3290","target":"59065ccd"},{"sourceAnchor":1,"targetAnchor":0,"index":4,"source":"59065ccd","id":"ad0fdda5","target":"aa1557a6"}]}
&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"]}]}
&AlertUserGroupBizId=已過期
&AlertDingDingGroupBizId=已過期
&ParentFlowList=[F-123456]
&ParentCategory=FC-F2495319DA05****
&公共請求參數

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyFlowForWebResponse>
    <Data>true</Data>
    <RequestId>243D5A48-96A5-4C0C-8966-93CBF65635ED</RequestId>
</ModifyFlowForWebResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Data" : true,
  "RequestId" : "243D5A48-96A5-4C0C-8966-93CBF65635ED"
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

訪問錯誤中心查看更多錯誤碼。