The DeleteMediaComplete event is triggered when a media asset is deleted. This topic covers the event notification content and callback examples.
Event type
DeleteMediaComplete
Event description
The DeleteMediaComplete event is generated only by the DeleteVideo operation.
Event notification content
|
Parameter Name |
Type |
Required |
Description |
|
EventType |
String |
Yes |
The event type. The value is fixed to DeleteMediaComplete. |
|
EventTime |
String |
Yes |
The time when the event was generated. The time is in UTC and formatted as yyyy-MM-ddTHH:mm:ssZ. |
|
Status |
String |
Yes |
The status of the media deletion.
|
|
MediaType |
String |
Yes |
The type of the media asset.
|
|
DeleteType |
String |
Yes |
The type of resource to delete.
|
|
MediaId |
String |
Yes |
The ID of the media asset. |
|
JobIds |
String |
No |
This parameter is returned only when DeleteType is set to stream. |
|
ErrorCode |
String |
No |
The error code. Returned when the delete operation fails. |
|
ErrorMessage |
String |
No |
The error message. Returned when the delete operation fails. |
Callback examples
Example callback:
-
For HTTP callbacks, the following content is the HTTP POST body.
-
For MNS callbacks, the following content is the message body.
Example of a successful media deletion callback:
{
"EventType": "DeleteMediaComplete",
"EventTime": "2017-03-20T07:49:17Z",
"Status": "success",
"MediaType": "video",
"DeleteType": "all",
"MediaId": "1234343b689jsi3ka5422dfe1e47****"
}
Example of a failed media deletion callback:
{
"EventType": "DeleteMediaComplete",
"EventTime": "2017-03-20T07:49:17Z",
"Status": "fail",
"MediaType": "video",
"DeleteType": "all",
"MediaId": "1234343b689jsi3ka5422dfe1e47****",
"ErrorCode": "InvalidVideo.NotFound",
"ErrorMessage": "The video does not exist."
}