Description
Specify tenant ID and create a volume by using json parameter.
(Specify the source volume by using json parameter)
Request URL
Block Storage API v2 POST /v2/{tenant_id}/volumes
Request Paramters
Parameter | Value | Style | Description |
---|---|---|---|
X-Auth-Token | User Token | header | |
tenant_id | Tenant ID | URI | |
source_volid | plain | ||
description (Optional) | plain | The volume description | |
snapshot_id (Optional) | plain | ||
size | plain | 200 or 500 are only allowed. | |
name (Optional) | plain | Half-width alphanumeric, "-" and "_" are only allowed. The length should be of 1-255 characters. | |
imageRef (Optional) | plain | ||
bootable (Optional) | plain | ||
metadata (Optional) | plain |
Request Json
{ "volume": { "availability_zone": null, "source_volid": null, "description": null, "snapshot_id": null, "size": 200, "name": "example-vol", "imageRef": null, "metadata": {} } }
Normal response codes
Created (201)
Example
curl -i -X POST \ -H "Accept: application/json" \ -H "X-Auth-Token: 35941e7df872405d84e5b026dba8323c" \ -H "Content-Type: application/json" \ -d '{"volume":{"source_volid":"40e84769-f99a-4d7f-8594-4d0db87bc7e4","description":null,"snapshot_id":null,"size":200,"name":"gmo-vol2","imageRef":null,"metadata":{}}}' \ https://block-storage.tyo1.cloud.z.com/v2/1864e71d2deb46f6b47526b69c65a45d/volumes
HTTP/1.1 202 Accepted Date: Thu, 11 Dec 2014 11:27:31 GMT Server: Apache Content-Length: 855 Content-Type: application/json { "volume": { "attachments": [], "availability_zone": "nova", "bootable": "false", "consistencygroup_id": null, "created_at": "2015-05-08T09:21:37.072946", "description": null, "encrypted": false, "id": "f7028d8d-89b7-499d-b185-1045d440c378", "links": [ { "href": "https://block-storage.tyo1.cloud.z.com/v2/1864e71d2deb46f6b47526b69c65a45d/volumes/f7028d8d-89b7-499d-b185-1045d440c378", "rel": "self" }, { "href": "https://block-storage.tyo1.cloud.z.com/1864e71d2deb46f6b47526b69c65a45d/volumes/f7028d8d-89b7-499d-b185-1045d440c378", "rel": "bookmark" } ], "metadata": {}, "name": "gmo-vol2", "replication_status": "disabled", "size": 200, "snapshot_id": null, "source_volid": "40e84769-f99a-4d7f-8594-4d0db87bc7e4", "status": "creating", "user_id": "ea63fc7a16bb4250aff7e203198eea22", "volume_type": "gnc_ext_ssd" } }