This topic describes the UpdateMediaStorageClassComplete event and provides sample callbacks.
Event type
UpdateMediaStorageClassComplete
Event description
The UpdateMediaStorageClassComplete event is triggered after the storage class of a media asset is changed. For more information about how to change the storage class of a media asset, 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. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC. |
EventType | String | Yes | The event type. The value is UpdateMediaStorageClassComplete. |
Status | String | Yes | Indicates whether the storage class change task is successful. Valid values:
|
MediaId | String | Yes | The ID of the media asset. The ID can be the video ID or 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. This parameter is returned if the storage class failed to be changed. |
ErrorMessage | String | No | The error message. This parameter is returned if the storage class failed to be changed. |
Sample callbacks
Description:
For an HTTP callback, the following example is the message body of the HTTP POST request.
For an MNS callback, the following example is 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" }