Resource Center/Resource Pool/Volume Operations
POSTVolume OperationsSince 0.6SynchronousAuth Required
CreateDataVolumeFromVolumeTemplate
CreateDataVolumeFromVolumeTemplate
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
imageUuidStringRequiredThe image UUID.
Body Fields
paramsObjectRequiredRequest body parameter object.
nameStringRequiredThe volume name.
descriptionStringOptional. The detailed description of the volume.
primaryStorageUuidStringRequiredThe primary storage UUID.
hostUuidStringOptional. The host UUID.
resourceUuidStringOptional. The resource UUID.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/volumes/data/from/data-volume-templates/{imageUuid}
/zstack/v1/volumes/data/from/data-volume-templates/{imageUuid}
Request Example
curl -X POST 'http://{host}/zstack/v1/volumes/data/from/data-volume-templates/{imageUuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","primaryStorageUuid":"<primaryStorageUuid>","hostUuid":"<hostUuid>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "289aaa0f33004cb6adba798bf9c8273b", "name": "test-volume", "primaryStorageUuid": "5697632ba45c46408044aefbab433945", "vmInstanceUuid": "c0dcccf2ca8945e1b96b446f7bdba30f", "diskOfferingUuid": "5909df7b2c3f4751b0491f53533c505f", "rootImageUuid": "a8c3608b85a0450d99b9b5339ee4dcec", "installPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-289aaa0f33004cb6adba798bf9c8273b/289aaa0f33004cb6adba798bf9c8273b.qcow2", "type": "Root", "format": "qcow2", "size": 1.073741824E11, "actualSize": 2.147483648E10, "deviceId": 0.0, "state": "Enabled", "status": "Ready", "createDate": "Jun 7, 2017 9:21:14 PM", "lastOpDate": "Jun 7, 2017 9:21:14 PM" } }Change History
This API has no change history records yet.
