調用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"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
訪問錯誤中心查看更多錯誤碼。