All Products
Search
Document Center

ApsaraVideo Media Processing:UpdateMediaPublishState

Last Updated:Aug 28, 2026

Updates the publishing status of a media file.

Operation description

When a media file is published, the access control list (ACL) of its playback resources and snapshot files inherits the ACL of the bucket to which they belong. When unpublished, the ACL is set to private.

QPS limit

You can call this operation up to 100 times per second per account. Requests that exceed this limit are dropped, which may cause service interruptions. For more information, see QPS limit.

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:UpdateMediaPublishState

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

MediaId

string

Yes

The ID of the media file whose publishing status you want to update. You can obtain the media file ID from the response of the AddMedia operation, or find it in the ApsaraVideo Media Processing (MPS) console by choosing Media Management > Media List, clicking Manage for the target video, and viewing the Basics tab.

3e6149d5a8c944c09b1a8d2dc3e4****

Publish

boolean

No

The publishing status. Default value: Initialed. Valid values:

  • true: published.

  • false: unpublished.

true

Default publishing state of a media file and status change rules

Default publishing state:

The default publishing state of a media file is Initialed. The following types of media files are in this state:

  • New media file: When a media file is generated for the first time (a media workflow is triggered for the first time) and the workflow is still running, the media file is in the Initialed state. After the workflow completes, the status changes to published or unpublished based on the workflow configurations.

  • Deleted media file: After a media file is deleted, the publishing status is no longer meaningful, and the file reverts to the Initialed state. If you restore the file to the media library, the workflow processes it as a new media file.

Status change rules

NoteThe publishing status transitions among the Initialed, published, and unpublished states. The transition rules differ between API calls and workflow execution.

Caller Status Changed status Allowed
API Initialed Published No
API Initialed Unpublished No
API Published Unpublished Yes
API Unpublished Published Yes
Workflow execution Initialed Published Yes
Workflow execution Initialed Unpublished Yes
Workflow execution Published Unpublished No
Workflow execution Unpublished Published No

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The ID of the request.

91B6CAB9-034C-4E4E-A40B-E7F5C81E688C

Examples

Success response

JSON format

{
  "RequestId": "91B6CAB9-034C-4E4E-A40B-E7F5C81E688C"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.