The UpdateMediaStorageClassComplete event is fired after the storage class of a media asset changes. This topic provides the event notification parameters and sample callbacks.
Event type
UpdateMediaStorageClassComplete
Event description
The UpdateMediaStorageClassComplete event is triggered after the storage class of a media asset changes. For more information, see Change the storage class of a media asset.
Event notification
|
Parameter |
Type |
Required |
Description |
|
EventTime |
String |
Yes |
The time when the event was generated, in the yyyy-MM-ddThh:mm:ssZ format (ISO 8601, UTC). |
|
EventType |
String |
Yes |
The event type. The value is UpdateMediaStorageClassComplete. |
|
Status |
String |
Yes |
Indicates whether the storage class change succeeded. Valid values:
|
|
MediaId |
String |
Yes |
The media asset ID, which can be a video ID or an audio ID. |
|
Scope |
String |
Yes |
The scope of the storage class change. Valid values:
|
|
StorageClass |
String |
Yes |
The storage class after the change. Valid values:
|
|
TriggerBy |
String |
Yes |
The source of the event. Valid values:
|
|
ErrorCode |
String |
No |
The error code. Returned only when the storage class change fails. |
|
ErrorMessage |
String |
No |
The error message. Returned only when the storage class change fails. |
Sample callbacks
Description:
-
For an HTTP callback, the following example shows the HTTP POST request body.
-
For an MNS callback, the following example shows the message body.
-
Example of a successful change
{ "EventType": "UpdateMediaStorageClassComplete", "EventTime": "2022-06-23T13:11:33Z", "Status": "Success", "MediaId": "71151b80f2d471ecb21b472190a9****", "Scope": "All", "StorageClass": "Archive", "TriggerBy": "API" } -
Example of a failed change
{ "EventType": "UpdateMediaStorageClassComplete", "EventTime": "2022-06-23T13:11:33Z", "Status": "Failed", "MediaId": "71151b80f2d471ecb21b472190a9****", "Scope": "All", "StorageClass": "Archive", "ErrorCode": "NoSuchKey", "ErrorMessage": "OSS bucket or object does not exist", "TriggerBy": "API" }
-