Resource Center/Resource Pool/Image Operations
POSTImage OperationsSince 0.6SynchronousAuth Required
CreateDataVolumeTemplateFromVolume
CreateDataVolumeTemplateFromVolume
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
paramsObjectRequiredRequest body parameter object.
nameStringRequiredThe name of the data volume image.
descriptionStringOptional. The detailed description of the data volume image.
volumeUuidStringRequiredThe UUID of the volume from which the data volume image is to be created.
backupStorageUuidsListOptional. The backup storage UUID list.
resourceUuidStringOptional. The UUID of the data volume image. If specified, the data volume image will use the specified value as UUID.
tagUuidsListOptional. The tag UUID.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/images/data-volume-templates/from/volumes/{volumeUuid}
/zstack/v1/images/data-volume-templates/from/volumes/{volumeUuid}
Request Example
curl -X POST 'http://{host}/zstack/v1/images/data-volume-templates/from/volumes/{volumeUuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","volumeUuid":"<volumeUuid>","backupStorageUuids":["<backupStorageUuids>"],"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "7247cf569e2b4104832071822cf845c5", "name": "My Data Volume Template", "mediaType": "DataVolumeTemplate", "platform": "Linux", "format": "raw", "backupStorageRefs": [ { "id": 0, "imageUuid": "7247cf569e2b4104832071822cf845c5", "backupStorageUuid": "1b8ab68b7e224a30aa31f00f1db2b5a6", "installPath": "ceph://zs-data-volume/0cd599ec519249489475112a058bb93a", "status": "Ready" } ] } }Change History
This API has no change history records yet.
