Updates a media workflow.
Operation description
This operation updates the topology of a media workflow. To update the trigger mode of a media workflow, see Update the trigger mode of a media workflow.
After a workflow is deleted or disabled, the workflow becomes unavailable. In this case, if you upload a file to the Object Storage Service (OSS) bucket path specified by the workflow, the workflow is not automatically triggered.
QPS limit
The QPS limit for a single user is 100 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Make API calls at a reasonable rate. For more information, see 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 be updated. You can obtain the ID by choosing MPS console > Workflow management > Workflow settings. |
6307eb0d3f85477882d205aa040f**** |
| Topology |
string |
Yes |
The updated topology of the media workflow. The value is a JSON object that includes the list of activities and activity dependencies. Note
The region of the OSS bucket must be the same as the region where MPS is deployed. |
{ "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 name of the media workflow.
|
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 detailed information about the media workflow. |
|
| CreationTime |
string |
The time when the media workflow was created. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format. |
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. 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.