All Products
Search
Document Center

ApsaraVideo VOD:UpdateMediaStorageClass

最終更新日:Dec 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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vod:UpdateMediaStorageClassupdate
*All Resources
*
    none
none

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.

MediaIdstring

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.

MediaForbiddenReasonDTOobject

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