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
Test
RAM authorization
|
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 |
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.