All Products
Search
Document Center

ApsaraVideo Media Processing:UpdateMediaWorkflow

Last Updated:Aug 28, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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.

  • Cannot be empty.

  • Must be unique within the same account.

  • Must not exceed 64 characters.

  • UTF-8 encoded.

mediaworkflow-example

TriggerMode

string

No

The trigger mode. Valid values:

  • OssAutoTrigger: Automatically triggered.

  • NotInAuto: Not automatically triggered.

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:

  • Inactive: The media workflow is disabled.

  • Active: The media workflow is enabled.

Active

TriggerMode

string

The trigger mode of the media workflow. Valid values:

  • OssAutoTrigger: The media workflow is automatically triggered.

  • NotInAuto: The media workflow is not automatically triggered.

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.