The RestoreMediaComplete event is generated when a media asset restoration completes.
Event type
RestoreMediaComplete
Event description
The RestoreMediaComplete event is generated when a media asset is restored. To restore a media asset, see Modify the storage class of a media asset.
Event content
|
Parameter Name |
Type |
Required |
Description |
|
EventTime |
String |
Yes |
The time when the event was generated. The time is in UTC and formatted as yyyy-MM-ddTHH:mm:ssZ. |
|
EventType |
String |
Yes |
The event type. The value is fixed to RestoreMediaComplete. |
|
Status |
String |
Yes |
The status of the media asset restoration task. Valid values:
|
|
MediaId |
String |
Yes |
The ID of the media asset. This can be the audio or video ID. |
|
RestoreExpiration |
String |
No |
The expiration time of the restored state. The time is in UTC and formatted as yyyy-MM-ddTHH:mm:ssZ. This field is returned when the restoration task is successful. |
|
ErrorCode |
String |
No |
The error code. This field is returned if the restoration task fails. |
|
ErrorMessage |
String |
No |
The error message. This field is returned if the restoration task fails. |
Sample callbacks
Notes on the callback examples:
-
For an HTTP callback, the following content is the HTTP POST body.
-
For an MNS callback, the following content is the message body.
-
Successful task
{ "EventType": "RestoreMediaComplete", "EventTime": "2022-06-23T13:11:33Z", "Status": "Success", "MediaId": "71151b80f2d471ecb21b472190a9****", "RestoreExpiration": "2023-01-23T13:11:33Z" } -
Failed task
{ "EventType": "RestoreMediaComplete", "EventTime": "2022-06-23T13:11:33Z", "Status": "Failed", "MediaId": "71151b80f2d471ecb21b472190a9****", "ErrorCode": "NoSuchKey", "ErrorMessage": "OSS bucket or object does not exist" }
-