Creates a virtual volume.
HTTP request syntax (URI)
POST <base_URI>/v7/storage/virtual-volumes
Parameters
Name | Type | Required | Values | Description |
---|---|---|---|---|
virtualServerId | BODY | Y | number | Virtual server ID for newly created virtual volume. |
filesystemId | BODY | Y | string | File system ID string to which the virtual volume belongs. |
virtualVolumeName | BODY | Y | string | Virtual volume name. |
fileSystemPath | BODY | Y | string | Absolute file system path to use for virtual volume. The path should be in UNIX format. |
createPathIfNotExists | BODY | N | boolean | Boolean flag to create the path. |
emails | BODY | N | array | An array of emails of users interested in receiving various notifications. |
Return codes
Code | Data | Description |
---|---|---|
201 | virtualVolume | Virtual volume object returned when created successfully. |
400 | No Data | Missing or invalid request contents. |
404 | Error Message | Requested resource not found. |
500 | Error message | Error associated with the storage system. |
501 | No Data | Server has not implemented the request operation on the resource. |
Any HTTP status code other than 201 indicates that the API did not complete successfully.
Request example
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.57.75:8444/v7/storage/virtual-volumes -d ‘{"virtualVolumeName":"xyz-xyz-unit-test1121", "virtualServerId":5, "filesystemId":"75412709E1CB9AAB0000000000000000","filesystemPath":"/xyzVirtualVolumeTest/test-11-21", "createPathIfNotExists":true,"emails": ["user1@xyz.com","user2@xyz.com"]}’ -X POST
Response example
HTTP/1.1 201 Created { "virtualVolume" : { "emails" : [ "user1@xyz.com", "user2@xyz.com" ], "fileCount" : 1, "filesystemId" : "75412709E1CB9AAB0000000000000000", "objectId" :"363a3a3a41414444444532373945463943323546303030303030303030303030303030303a3a3a31", "name" : "xyz-unit-test1121", "path" : "/xyzVirtualVolumeTest/test-11-21", "permanentId" : 8449077299320167083, "totalVolumeCapacity" : 19520290816, "usageVolumeCapacity" : 0, "virtualServerId" : 5, "virtualVolumeId" : 12 }, "uri" : "https://172.17.57.75:8444/v7/storage/virtual-volumes/363a3a3a41414444444532373945463943323546303030303030303030303030303030303a3a3a31" }