修改带图形信息的工作流所用参数及示例

请求参数

参数 类型 是否必选 示例值 描述
Id String F-7A39731FE7196358 工作流ID
ProjectId String FP-3535FE0BE5224A47 项目ID
RegionId String cn-hangzhou 区域ID
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"]}]} 报警通知配置, eventId目前支持EMR-210401001(工作流失败报警), EMR-110401002(工作流成功通知), EMR-110401015(工作流节点失败报警)
AlertDingDingGroupBizId String 已过期 报警钉钉群信息
AlertUserGroupBizId String 已过期 报警用户组信息
ClusterId String A23BD131A862F184 集群ID
CreateCluster Boolean false 是否通过集群模板创建集群, ture表示通过集群模板创建集群ClusterId应设置为集群模板ID(CT-xxx), 否则为已有集群ID(C-xxx)
CronExpr String 0 0 0-23/1 * * ? 时间周期调度的cron表达式, 请参考A Cron Expressions
Description String 这是一个工作流描述 工作流描述, 长度限制为256个字符
EndSchedule Long 1538018814000 调度失效时间, 长整型时间戳, 例如: System.currentTimeMillis()
Graph String {"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 String emr-header-1.cluster-123456 指定运行的机器信息, 格式为 emr-header-1.cluster-123456
Name String my_flow 工作流名称 长度限制为64个字符 同一个项目中不允许重名
ParentCategory String FC-F2495319DA05CEE5 父目录ID
ParentFlowList String [F-123456] 依赖的父工作流列表
Periodic Boolean true 是否周期调度
StartSchedule Long 1538017814000 调度生效时间, 长整型时间戳, 例如: System.currentTimeMillis(). 1. 必须小于EndSchedule 2. 当CronExpr不为空时, 此项必填
Status String STOP_SCHEDULE 状态, 支持STOP_SCHEDULE、UNDER_SCHEDULE

返回参数

字段 类型 示例值 描述
RequestId String 243D5A48-96A5-4C0C-8966-93CBF65635ED 请求ID
Data Boolean true 结果

示例

  • 请求示例
    /?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=这是一个工作流描述
    &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
    &<公共请求参数>
  • 正常返回示例
    JSON 格式
    {
    	"Data":true,
    	"RequestId":"ECC2D0D1-B6D5-468D-B698-30E8805EB574"
    }
  • 异常返回示例
    JSON 格式
    {
    	"code":"FLOW_API_FAILED",
    	"message":"Invalid type [INVALID_TYPE]",
    	"requestId":"11BAFBD8-8509-4177-A26D-407505E73713",
    	"successResponse":false
    }

错误码

查看本产品错误码