Updates the topology of a media workflow.
Operation description
-
Updates the topology of a media workflow. To update the trigger mode, use Update the trigger mode of a media workflow.
-
After a workflow is deleted or disabled, uploading files to its specified OSS bucket path no longer triggers automatic workflow execution.
QPS limit
This API allows up to 100 QPS per user. Exceeding this limit triggers rate limiting, which may affect your business. QPS limits.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mts:UpdateMediaWorkflow |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| MediaWorkflowId |
string |
Yes |
The ID of the media workflow to update. You can find this ID in the ApsaraVideo Media Processing (MPS) console under Workflows > Workflow Settings. |
6307eb0d3f85477882d205aa040f**** |
| Topology |
string |
Yes |
The new topology of the media workflow, specified as a JSON object containing the activity list and dependencies. Note
The OSS bucket must reside in the same region as your MPS service. |
{ "Activities": { "Act-Start": { "Parameters": { "PipelineId": "130266f58161436a80bf07cb12c8****", "InputFile": "{\"Bucket\": \"example-bucket-****\",\"Location\": \"cn-shanghai\"}" }, "Type": "Start" }, "Act-Report": { "Parameters": {}, "Type": "Report" }, "Act-Transcode-M3U8": { "Parameters": { "Outputs": "[{\"Object\":\"transcode/{ObjectPrefix}{FileName}\",\"TemplateId\": \"957d1719ee85ed6527b90cf62726****\"}]", "OutputBucket": "example-bucket-****", "OutputLocation": "cn-shanghai" }, "Type": "Transcode" } }, "Dependencies": { "Act-Start": [ "Act-Transcode-M3U8" ], "Act-Report": [], "Act-Transcode-M3U8": [ "Act-Report" ] } } |
| Name |
string |
No |
The media workflow name.
|
mediaworkflow-example |
| TriggerMode |
string |
No |
The trigger mode. Valid values:
|
OssAutoTrigger |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The ID of the request. |
7D752035-97DA-54E5-88E2-E8405EEA**** |
| MediaWorkflow |
object |
The media workflow details. |
|
| CreationTime |
string |
The time when the media workflow was created. |
2016-04-01T05:29:38Z |
| MediaWorkflowId |
string |
The ID of the updated media workflow. |
6307eb0d3f85477882d205aa040f**** |
| State |
string |
The state of the media workflow. Valid values:
|
Active |
| TriggerMode |
string |
The trigger mode of the media workflow. Valid values:
|
OssAutoTrigger |
| Name |
string |
The name of the media workflow. |
examp-mediaworkflow-**** |
| Topology |
string |
The topology of the media workflow. |
{ "Activities": { "Act-Start": { "Parameters": { "PipelineId": "130266f58161436a80bf07cb12c8****", "InputFile": "{\"Bucket\": \"example-bucket-****\",\"Location\": \"cn-shanghai\"}" }, "Type": "Start" }, "Act-Report": { "Parameters": {}, "Type": "Report" }, "Act-Transcode-M3U8": { "Parameters": { "Outputs": "[{\"Object\":\"transcode/{ObjectPrefix}{FileName}\",\"TemplateId\": \"957d1719ee85ed6527b90cf62726****\"}]", "OutputBucket": "example-bucket-****", "OutputLocation": "cn-shanghai" }, "Type": "Transcode" } }, "Dependencies": { "Act-Start": [ "Act-Transcode-M3U8" ], "Act-Report": [], "Act-Transcode-M3U8": [ "Act-Report" ] } } |
Examples
Success response
JSON format
{
"RequestId": "7D752035-97DA-54E5-88E2-E8405EEA****",
"MediaWorkflow": {
"CreationTime": "2016-04-01T05:29:38Z",
"MediaWorkflowId": "6307eb0d3f85477882d205aa040f****",
"State": "Active",
"TriggerMode": "OssAutoTrigger",
"Name": "examp-mediaworkflow-****",
"Topology": "{\n \"Activities\": {\n \"Act-Start\": {\n \"Parameters\": {\n \"PipelineId\": \"130266f58161436a80bf07cb12c8****\",\n \"InputFile\": \"{\\\"Bucket\\\": \\\"example-bucket-****\\\",\\\"Location\\\": \\\"cn-shanghai\\\"}\"\n },\n \"Type\": \"Start\"\n },\n \"Act-Report\": {\n \"Parameters\": {},\n \"Type\": \"Report\"\n },\n \"Act-Transcode-M3U8\": {\n \"Parameters\": {\n \"Outputs\": \"[{\\\"Object\\\":\\\"transcode/{ObjectPrefix}{FileName}\\\",\\\"TemplateId\\\": \\\"957d1719ee85ed6527b90cf62726****\\\"}]\",\n \"OutputBucket\": \"example-bucket-****\",\n \"OutputLocation\": \"cn-shanghai\"\n },\n \"Type\": \"Transcode\"\n }\n },\n \"Dependencies\": {\n \"Act-Start\": [\n \"Act-Transcode-M3U8\"\n ],\n \"Act-Report\": [],\n \"Act-Transcode-M3U8\": [\n \"Act-Report\"\n ]\n }\n}"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.