All Products
Search
Document Center

ApsaraVideo VOD:RestoreMedia

更新時間:Dec 19, 2024

Restores media assets.

Operation description

You can call this operation to restore only Archive and Cold Archive audio and video files. You can access the audio and video files after the files are restored. You cannot change the storage class of an audio or video file that is being restored. You are charged for the retrieval traffic generated during restoration. After a Cold Archive audio or video file is restored, a Standard replica of the file is generated for access. You are charged for the storage of the replica before the file returns to the frozen state.

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:RestoreMediaupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MediaIdsstringYes

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

  • Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Audio/Video. On the Video and Audio page, 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 VideoId from the response to the CreateUploadVideo operation that you call to upload media assets.
  • Obtain the value of VideoId from the response to the SearchMedia operation that you call to query the media ID after the media asset is uploaded.
8bc8e94fe4e55abde85718****,eb186180e989dd56****
ScopestringNo

The modification range. Valid values:

  • All: restores all resources, including the source files and transcoded streams.
  • SourceFile: restores only the source files.
All
RestoreDaysstringNo

The number of days during which media assets remain in the restored state. Default value: 1. The maximum validity period of a restored Archive media asset is 7 days and the maximum validity period of a restored Cold Archive media asset is 365 days.

2
RestoreTierstringNo

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

  • Expedited: The file is restored within 1 hour.
  • Standard: The file is restored within 2 to 5 hours.
  • Bulk: The file is restored within 5 to 12 hours.
Standard

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

8E70E3F8-E2EE-47BC-4677-379D6F28****
Successboolean

Indicates whether the request was successful.

true
IgnoredListarray

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

MediaIdstring

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

['7f29b8d0c5fa71ed9685e6f7d559****']
ForbiddenListarray<object>

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

MediaForbiddenReasonDTOobject

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

MediaIdstring

The ID of the media asset.

fa10ee70898671edb99f6eb3690d****
Reasonstring

The reason for the failure.

Forbidden.RestoreMedia

Examples

Sample success responses

JSONformat

{
  "RequestId": "8E70E3F8-E2EE-47BC-4677-379D6F28****",
  "Success": true,
  "IgnoredList": {
    "MediaId": [
      "['7f29b8d0c5fa71ed9685e6f7d559****']"
    ]
  },
  "ForbiddenList": {
    "MediaForbiddenReasonDTO": [
      {
        "MediaId": "fa10ee70898671edb99f6eb3690d****",
        "Reason": "Forbidden.RestoreMedia"
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-04-11The internal configuration of the API is changed, but the call is not affectedView Change Details