All Products
Search
Document Center

ApsaraVideo VOD:UpdateMediaStorageClass

Last Updated:Jul 19, 2024

Modifies the storage classes of media assets.

Operation description

  • This operation is an asynchronous operation. You can call this operation to modify the storage classes of media assets. After the storage class is modified, a callback notification is sent.
  • If the storage class of the media asset is Archive or Cold Archive and you call this operation to modify the storage class of the media asset, the media asset is automatically restored before the storage class is modified. You do not need to call the RestoreMedia operation to restore the media asset. You must specify the restoration priority for Cold Archive objects. Default configuration: RestoreTier=Standard.
  • Media assets whose storage classes are being modified cannot be used or processed.
  • Non-Standard objects have minimum storage durations. If an object is stored for less than the minimum storage duration, the storage class of the object cannot be changed. The following content describes the minimum storage durations for objects in different storage classes: IA or IA storage for source files: 30 days, Archive or Archive storage for source files: 60 days, Cold Archive or Cold Archive for source files: 180 days.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
MediaIdsstringYes

The media asset ID. You can specify a maximum of 20 IDs. Separate multiple IDs with commas (,). You can use one of the following methods to obtain the ID:

  • Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Audio/Video. On the Video and Audio page, you can view the ID of the media asset. This method is applicable to files that are uploaded by using the ApsaraVideo VOD console.
  • Obtain the value of the VideoId parameter from the response to the CreateUploadVideo operation that you call to upload media assets.
  • Obtain the value of the VideoId parameter from the response to the SearchMedia operation that you call to query the media ID after the media asset is uploaded.
d56c2ac0cee271ed80004710b5ba****
ScopestringNo

The modification range. Valid values:

  • All: modifies the storage classes of all resources including the source files and transcoded streams.
  • SourceFile: modifies the storage classes of only the source files. The storage class of other resources is Standard.
All
StorageClassstringYes

The storage class. Valid values:

  • Standard
  • IA
  • Archive
  • ColdArchive
Archive
RestoreTierstringNo

The restoration priority. This parameter is required only when you restore a Cold Archive media asset. Valid values:

  • Expedited
  • Standard
  • Bulk
Standard
AllowUpdateWithoutTimeLimitbooleanNo

Specifies whether to change the storage class of a media asset that is stored for less than the minimum storage duration. Valid values:

  • true
  • false
Note If you forcibly change the storage class of a media asset that is stored for less than the minimum storage duration, additional data retrieval fees are incurred.
false

You can specify the duration of the restored state and the restoration priority of a Cold Archive object. The duration of the restored state ranges from 1 to 365 days. The time required for object restoration varies based on the restoration priority:

  • Expedited: The object is restored within one hour.
  • Standard: The object is restored within two to five hours.
  • Bulk: The object is restored in five to twelve hours.

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

30FA0B7C-3A81-5449-93CD-ACA149E6****
Statusstring

The state of the task. Valid values:

  • Processing
  • Failed
Processing
IgnoredListarray

The IDs of the media assets that failed to be obtained.

string

The ID of the media asset that failed to be obtained.

['19e231ee6e3e417fbf2e92ec2680****']
ForbiddenListarray<object>

The IDs of the media assets that failed to be processed.

object

The information about the media asset that failed to be processed.

MediaIdstring

The ID of the media asset.

19e231ee6e3e417fbf2e92ec2680****
Reasonstring

The reason for the failure.

TargetStorageClassInconsistent

Examples

Sample success responses

JSONformat

{
  "RequestId": "30FA0B7C-3A81-5449-93CD-ACA149E6****",
  "Status": "Processing",
  "IgnoredList": {
    "MediaId": [
      "['19e231ee6e3e417fbf2e92ec2680****']"
    ]
  },
  "ForbiddenList": {
    "MediaForbiddenReasonDTO": [
      {
        "MediaId": "19e231ee6e3e417fbf2e92ec2680****",
        "Reason": "TargetStorageClassInconsistent"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-08-18The internal configuration of the API is changed, but the call is not affectedView Change Details