This topic describes the DeleteMediaComplete event, the content of its notification, and examples of callbacks.
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. This is a required parameter. 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 | Delete a resource type.
|
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 for the job. This field is returned when an error occurs during the delete operation. |
ErrorMessage | String | No | The error message for the job. This field is returned when an error occurs during the delete operation. |
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.
The following is an example of a callback message for a successful media deletion:
{
"EventType": "DeleteMediaComplete",
"EventTime": "2017-03-20T07:49:17Z",
"Status": "success",
"MediaType": "video",
"DeleteType": "all",
"MediaId": "1234343b689jsi3ka5422dfe1e47****"
}The following is an example of a callback message for a media deletion that failed:
{
"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."
}