Create volume 1

Method URI Description
POST /v2/{tenant_id}/volumes Creates a volume.

To create a bootable volume, specify the ID of the volume to use for volume creation in the imageRef attribute in the request body section.

Normal response codes: 202

Request

This table shows the URI parameters for the volume creation request.

Name Type Description
{tenant_id} String Project ID

This table shows the parameters for the body section of the volume creation request.

Name Type Description
availability_zone String

(Optional)

Availability zone name
CAUTION:

When creating an additional volume, specify the same availability zone as the virtual server to connect to.

If a different availability zone from that of the virtual server to connect to is specified, it is not possible to connect the virtual server and the additional volume.

source_volid Uuid

(Optional)

To create a volume from an existing volume, specify the ID of the existing volume.
description String

(Optional)

A description of the volume
snapshot_id Uuid

(Optional)

To create a volume from an existing snapshot, specify the ID of the snapshot of the existing volume.
size Int

(Optional if snapshot_id is specified)

The size of the volume (Unit: GB)
name String

(Optional)

The volume name
imageRef Uuid

(Optional)

The ID of the image to use as the source for volume creation

Creation of a bootable volume is necessary

volume_type String

(Optional)

The associated volume type
metadata String

(Optional)

One or more pairs of metadata keys and values to associate with the volume

Example. Create volume: JSON request


{
	"volume": {
		"availability_zone": null,
		"source_volid": null,
		"description": null,
		"snapshot_id": null,
		"size": 10,
		"name": "my_volume",
		"imageRef": null,
		"volume_type": null,
		"metadata": {}
	}
}
     

Response

Example. Create volume: JSON response


{
	"volume": {
		"status": "creating",
		"name": "my_volume",
		"attachments": [],
		"availability_zone": "nova",
		"bootable": "false",
		"created_at": "2014-02-21T19:52:04.949734",
		"description": null,
		"volume_type":"M1",
		"snapshot_id": null,
		"source_volid": null,
		"metadata": {},
		"id": "93c2e2aa-7744-4fd6-a31a-80c4726b08d7",
		"size": 10
	}
}
     

This table shows the parameters for the body section of the volume creation response.

Name Type Description
status String

(Required)

The status of the volume
name String

(Required)

The volume name
attachments String

(Required)

One or more attached instances
availability_zone String

(Required)

The availability zone name
bootable Boolean

(Required)

Enable or disable the bootable attribute. It is possible to start an instance from a bootable volume.
created_at Datetime

(Required)

The creation datetime of the volume
description String

(Required)

A description of the volume
volume_type String

(Required)

The associated volume type
snapshot_id Uuid

(Required)

To create a volume from an existing snapshot of a volume, specify the ID of the snapshot of the existing volume.
source_volid Uuid

(Required)

To create a volume from an existing volume, specify the ID of the existing volume.
metadata String

(Required)

One or more pairs of metadata keys and values to associate with the volume
id Uuid

(Required)

The volume ID
size Int

(Required)

The size of the volume (Unit: GB)