Updates the publishing status of a media file.
Operation description
The published state indicates that the access control list (ACL) of media playback resources and snapshot files is set to inherit the ACL of the bucket to which they belong. The unpublished state indicates that the ACL of media playback resources and snapshot files 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 and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limit.
Debugging
Authorization information
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 ID of a media file from the response of the AddMedia operation. Alternatively, perform the following operations in the ApsaraVideo Media Processing (MPS) console: In the left-side navigation pane, choose Media Management > Media List. Find the required video and click Manage. The ID of the video is displayed on 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 two types of media files are in the Initialed 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 media execution of the workflow is in progress, the media file is in the Initialed state. After the execution of the media workflow is complete, the status of the media file changes to published or unpublished based on the configurations of the media workflow.
- Deleted media file: After a media file is deleted, the publishing status is meaningless, and the media file is in the Initialed state. If you restore the deleted media file to the media library, a workflow is executed on the file as a new media file.
Status change rules
NoteThe publishing status changes among the Initialed, published, and unpublished states. The status change rules for the API are different from those for 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 parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "91B6CAB9-034C-4E4E-A40B-E7F5C81E688C"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|