Modifies the storage class of a media asset.
Operation description
-
Before using this operation, make sure that you fully understand the billing methods and pricing of ApsaraVideo VOD. Modifying the storage class of a media asset incurs storage fees. For billing details, see Media asset storage billing.
-
Modifying the storage class is an asynchronous operation. A callback is sent to you after the entire operation is complete.
-
If the current storage class of a media asset is Archive or ColdArchive, calling this operation automatically triggers a restore. After the restore is complete, the storage class is modified. You do not need to manually call the RestoreMedia operation to restore the media asset. For ColdArchive media assets, you need to specify the restore priority. The default value is RestoreTier=Standard.
-
A media asset that is being modified cannot be modified again or be used for production or processing.
-
Media assets in non-Standard storage classes have minimum storage duration requirements: Infrequent Access/source file Infrequent Access requires at least 30 days. Archive/source file Archive requires at least 60 days. ColdArchive/source file ColdArchive requires at least 180 days. If the storage duration is insufficient, modifying the storage class incurs storage fees for the remaining days. For example, if you modify the storage class from Infrequent Access to Standard after 10 days of storage, you are charged for the remaining 20 days of Infrequent Access storage, totaling 30 days of Infrequent Access storage fees.
-
Modifying the storage class of a self-managed bucket is not supported.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vod:UpdateMediaStorageClass |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| MediaIds |
string |
Yes |
The media IDs, which are audio or video IDs (VideoId). Separate multiple IDs with commas (,). A maximum of 20 IDs are supported. You can obtain the IDs by using the following methods:
|
d56c2ac0cee271ed80004710b5ba**** |
| Scope |
string |
No |
The scope of the modification. If this parameter is not specified, the default value All is used. Valid values:
|
All |
| StorageClass |
string |
Yes |
The storage class. Valid values:
|
Archive |
| RestoreTier |
string |
No |
The restore priority (required only for ColdArchive media assets). If this parameter is not specified, the default value Standard is used. Valid values:
|
Standard |
| AllowUpdateWithoutTimeLimit |
boolean |
No |
Specifies whether to allow storage class modification for media assets that have not met the minimum storage duration requirement. Valid values:
Note
If the storage duration of a media asset is insufficient and you force a storage class modification, additional retrieval fees are incurred. |
false |
For ColdArchive media assets, you can specify the restore duration and restore priority. The restore duration ranges from 1 day to 365 days. The retrieval time for different restore priorities is as follows:
Expedited: The restore is completed within 1 hour.
Standard: The restore is completed within 2 to 5 hours.
Bulk: The restore is completed within 5 to 12 hours.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
30FA0B7C-3A81-5449-93CD-ACA149E6**** |
| Status |
string |
The task status. Valid values:
|
Processing |
| IgnoredList |
object |
||
| MediaId |
array |
The list of media asset IDs that failed to be retrieved. |
|
|
string |
The media asset ID that failed to be retrieved. |
['19e231ee6e3e417fbf2e92ec2680****'] |
|
| ForbiddenList |
object |
||
| MediaForbiddenReasonDTO |
array<object> |
The list of media asset IDs that failed to be processed. |
|
|
object |
The information about the media asset that failed to be processed. |
||
| MediaId |
string |
The ID of the media asset. |
19e231ee6e3e417fbf2e92ec2680**** |
| Reason |
string |
The reason for the failure. |
TargetStorageClassInconsistent |
Examples
Success response
JSON format
{
"RequestId": "30FA0B7C-3A81-5449-93CD-ACA149E6****",
"Status": "Processing",
"IgnoredList": {
"MediaId": [
"['19e231ee6e3e417fbf2e92ec2680****']"
]
},
"ForbiddenList": {
"MediaForbiddenReasonDTO": [
{
"MediaId": "19e231ee6e3e417fbf2e92ec2680****",
"Reason": "TargetStorageClassInconsistent"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.