Changing the OBS Storage Class of a Media Asset
Function
Changes the OBS storage class of a media file.
By default, the Standard storage class applies to media file upload. You can change the storage class to Infrequent Access or Archive.
-
Infrequent Access can be changed to Standard or downgraded to Archive.
-
Archive can only be changed to Standard and cannot be directly changed to Infrequent Access.
About OBS billing:
-
The minimum storage period of Infrequent Access is 30 days, and that of Archive is 90 days. If media files are retrieved or deleted before the storage period expires, you will still be charged based on the minimum storage period.
Infrequent Access is used as an example. If the actual storage period is < 30 days, you will be charged based on the minimum storage period (30 days). If the actual storage period is ≥ 30 days, you will be charged based on the actual storage period.
-
You will be charged for media file retrieval when changing the storage class from Infrequent Access or Archive to Standard.
URI
PUT /v1/{project_id}/asset/storage-mode
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
User token. This parameter is mandatory when token authentication is used. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
Authorization |
No |
String |
Authentication information. This parameter is mandatory for AK/SK authentication. |
X-Sdk-Date |
No |
String |
Time when the request is sent. This parameter is mandatory for AK/SK authentication. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
asset_id |
Yes |
String |
Original media asset ID. |
storage_mode |
Yes |
String |
Storage mode. Options:
|
restore_mode |
No |
String |
How the storage class is changed from Archive to another option. Options:
|
days |
No |
Integer |
Time when the storage class is temporarily changed from Archive to Standard. Value range: 1–30. Unit: day |
restore_tier |
No |
String |
Archive restoration options:
Default value: EXPEDITED |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
task_result_array |
Array of TaskResult objects |
Delivery result of the task for changing the media asset storage mode. |
Parameter |
Type |
Description |
---|---|---|
asset_id |
String |
Media asset ID. |
status |
String |
Checks whether the task for changing the media asset storage mode is successfully delivered. Options:
|
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error description |
Example Requests
Changing the OBS Storage Class of a Media Asset
PUT https://{endpoint}/v1/{project_id}/asset/storage-mode Content-Type: application/json { "asset_id": "2305739f855413a84af9e6ad6e2b21be", "storage_mode": "WARM" }
Example Responses
Status code: 200
The information is returned when the request succeeded.
{ "task_result_array" : [ { "asset_id" : "2305739f855413a84af9e6ad6e2b21be", "status" : "SUCCEED" } ] }
Status code: 400
The information is returned when the request failed.
{ "error_code" : "VOD.10053", "error_msg" : "The request parameter is illegal, illegal field: {xx}." }
Status Codes
Status Code |
Description |
---|---|
200 |
The information is returned when the request succeeded. |
400 |
The information is returned when the request failed. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot