All Products
Search
Document Center

ApsaraVideo Media Processing:UpdateMediaWorkflow

Last Updated:Oct 13, 2026

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

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 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.

  • The name cannot be an empty string.

  • The name must be unique within the same account.

  • The name can be up to 64 characters in length.

  • The name must be encoded in UTF-8.

mediaworkflow-example

TriggerMode

string

No

The trigger mode. Valid values:

  • OssAutoTrigger: Automatically triggers the workflow.

  • NotInAuto: Does not automatically trigger the workflow.

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:

  • Inactive: The workflow is disabled.

  • Active: The workflow is enabled.

Active

TriggerMode

string

The trigger mode. Valid values:

  • OssAutoTrigger: Automatically triggers the workflow.

  • NotInAuto: Does not automatically trigger the workflow.

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.