This is an extension API and used to export a private image to an OBS bucket.
Before exporting an image, ensure that you have the Tenant Administrator permission for OBS.
POST /v1/cloudimages/{image_id}/file
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
image_id |
Yes |
String |
Specifies the image ID. For details about how to obtain the image ID, see Querying Images. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
bucket_url |
Yes |
String |
Specifies the URL of the image file in the format of Bucket name:File name. NOTE:
The storage class of the OBS bucket must be Standard. |
file_format |
Yes |
String |
Specifies the file format. The value can be qcow2, vhd, zvhd, or vmdk. |
is_quick_export |
No |
Boolean |
Whether to enable fast export. The value can be true or false. NOTE:
If fast export is enabled, file_format cannot be specified. |
POST https://{Endpoint}/v1/cloudimages/d164b5df-1bc3-4c3f-893e-3e471fd16e64/file
1 2 3 4 5 | { "bucket_url": "ims-image:centos7_5.qcow2", "file_format": "qcow2", "is_quick_export": false } |
Parameter |
Type |
Description |
---|---|---|
job_id |
String |
Specifies the asynchronous job ID. For details, see Asynchronous Job Query. |
STATUS CODE 200
1 2 3 | { "job_id": "edc89b490d7d4392898e19b2deb34797" } |
Returned Value |
Description |
---|---|
400 Bad Request |
Request error. For details about the returned error code, see Error Codes. |
401 Unauthorized |
Authentication failed. |
403 Forbidden |
You do not have the rights to perform the operation. |
404 Not Found |
The requested resource was not found. |
500 Internal Server Error |
Internal service error. |
503 Service Unavailable |
The service is unavailable. |