全部产品
存储与CDN 数据库 安全 应用服务 数加·人工智能 数加·大数据基础服务 互联网中间件 视频服务 开发者工具 解决方案 物联网
媒体转码

更新媒体工作流

更新时间:2017-10-27 15:36:17

更新媒体工作流

描述

用于更新媒体工作流的拓扑结构

请求参数

名称 类型 必填项 描述
Action String 操作接口名,系统规定参数,取值:UpdateMediaWorkflow
MediaWorkflowId String 媒体工作流Id
Topology String 媒体工作流拓扑结构,Json对象,包括活动列表及活动依赖,见Topology示例。

Topology示例:

  1. {
  2. "Activities": {
  3. "Act-Transcode-M3U8": {
  4. "Parameters": {
  5. "Outputs": "[{\"OutputObject\":\"transcode%2F%7BObjectPrefix%7D%7BFileName%7D\",\"TemplateId\": \"957d1719ee85ed6527b90cf62726cbef\"}]",
  6. "OutputBucket": "panda-vod-hls",
  7. "OutputLocation": "oss-cn-hangzhou"
  8. },
  9. "Type": "Transcode"
  10. },
  11. "Act-Start": {
  12. "Name": "Act-Start",
  13. "Parameters": {
  14. "PipelineId": "130266f58161436a80bf07cb12c8009a",
  15. "InputFile": "{\"Bucket\": \"panda-vod\",\"Location\": \"oss-cn-hangzhou\"}"
  16. },
  17. "Type": "Start"
  18. },
  19. "Act-Report": {
  20. "Name": "Act-Report",
  21. "Parameters": {},
  22. "Type": "Report"
  23. }
  24. },
  25. "Dependencies": {
  26. "Act-Transcode-M3U8": [
  27. "Act-Report"
  28. ],
  29. "Act-Start": [
  30. "Act-Transcode-M3U8"
  31. ],
  32. "Act-Report": []
  33. }
  34. }

返回参数

名称 类型 描述
MediaWorkflow MediaWorkflow 媒体工作流

示例

请求示例

  1. https://mts.cn-hangzhou.aliyuncs.com/?Action=UpdateMediaWorkflow&Topology=%7B%22Activities%22%3A%7B%22Act-Start%22%3A%7B%22Parameters%22%3A%7B%22PipelineId%22%3A%22130266f58161436a80bf07cb12c8009a%22%2C%22InputFile%22%3A%22%7B%5C%22Bucket%5C%22%3A+%5C%22panda-vod%5C%22%2C%5C%22Location%5C%22%3A+%5C%22oss-cn-hangzhou%5C%22%7D%22%7D%2C%22Type%22%3A%22Start%22%7D%2C%22Act-Report%22%3A%7B%22Parameters%22%3A%7B%7D%2C%22Type%22%3A%22Report%22%7D%2C%22Act-Transcode-M3U8%22%3A%7B%22Parameters%22%3A%7B%22Outputs%22%3A%22%5B%7B%5C%22OutputObject%5C%22%3A%5C%22transcode%252F%257BObjectPrefix%257D%257BFileName%257D%5C%22%2C%5C%22TemplateId%5C%22%3A+%5C%22957d1719ee85ed6527b90cf62726cbef%5C%22%7D%5D%22%2C%22OutputBucket%22%3A%22panda-vod-hls%22%2C%22OutputLocation%22%3A%22oss-cn-hangzhou%22%7D%2C%22Type%22%3A%22Transcode%22%7D%7D%2C%22Dependencies%22%3A%7B%22Act-Start%22%3A%5B%22Act-Transcode-M3U8%22%5D%2C%22Act-Report%22%3A%5B%5D%2C%22Act-Transcode-M3U8%22%3A%5B%22Act-Report%22%5D%7D%7D&<公共参数>

返回示例

XML:

  1. <UpdateMediaWorkflowResponse>
  2. <RequestId>F95B44E5-ECE1-4356-AD1C-2CF2D2B5043C</RequestId>
  3. <MediaWorkflow>
  4. <CreationTime>2016-04-01T05:29:38Z</CreationTime>
  5. <Name>mediaworkflow-test</Name>
  6. <State>Inactive</State>
  7. <Topology>{"Activities":{"Act-Start":{"Parameters":{"PipelineId":"130266f58161436a80bf07cb12c8009a","InputFile":"{\"Bucket\": \"panda-vod\",\"Location\": \"oss-cn-hangzhou\"}"},"Type":"Start"},"Act-Report":{"Parameters":{},"Type":"Report"},"Act-Transcode-M3U8":{"Parameters":{"Outputs":"[{\"OutputObject\":\"transcode%2F%7BObjectPrefix%7D%7BFileName%7D\",\"TemplateId\": \"957d1719ee85ed6527b90cf62726cbef\"}]","OutputBucket":"panda-vod-hls","OutputLocation":"oss-cn-hangzhou"},"Type":"Transcode"}},"Dependencies":{"Act-Start":["Act-Transcode-M3U8"],"Act-Report":[],"Act-Transcode-M3U8":["Act-Report"]}}</Topology>
  8. <MediaWorkflowId>93ab850b4f6f44eab54b6e91d24d81d4</MediaWorkflowId>
  9. </MediaWorkflow>
  10. </UpdateMediaWorkflowResponse>

Json:

  1. {
  2. "RequestId": "A06BF02F-1BA7-4866-85FE-B17D318DBD47",
  3. "MediaWorkflow": {
  4. "CreationTime": "2016-04-01T05:29:38Z",
  5. "Name": "mediaworkflow-test",
  6. "State": "Inactive",
  7. "Topology": "{\"Activities\":{\"Act-Start\":{\"Parameters\":{\"PipelineId\":\"130266f58161436a80bf07cb12c8009a\",\"InputFile\":\"{\\\"Bucket\\\": \\\"panda-vod\\\",\\\"Location\\\": \\\"oss-cn-hangzhou\\\"}\"},\"Type\":\"Start\"},\"Act-Report\":{\"Parameters\":{},\"Type\":\"Report\"},\"Act-Transcode-M3U8\":{\"Parameters\":{\"Outputs\":\"[{\\\"OutputObject\\\":\\\"transcode%2F%7BObjectPrefix%7D%7BFileName%7D\\\",\\\"TemplateId\\\": \\\"957d1719ee85ed6527b90cf62726cbef\\\"}]\",\"OutputBucket\":\"panda-vod-hls\",\"OutputLocation\":\"oss-cn-hangzhou\"},\"Type\":\"Transcode\"}},\"Dependencies\":{\"Act-Start\":[\"Act-Transcode-M3U8\"],\"Act-Report\":[],\"Act-Transcode-M3U8\":[\"Act-Report\"]}}",
  8. "MediaWorkflowId": "93ab850b4f6f44eab54b6e91d24d81d4"
  9. }
  10. }
本文导读目录