| Method | URI | Description |
|---|---|---|
| PUT | /v2/{tenant_id}/volumes/{volume_id}{?display_description,display_name} | Updates a volume. |
Normal response codes: 200
This table shows the URI parameters for the update volume request:
| Name | Type | Description |
|---|---|---|
| String | The unique identifier of the tenant or account. |
| UUID | The unique identifier of an existing volume. |
This table shows the query parameters for the update volume request:
| Name | Type | Description |
|---|---|---|
| String (Optional) | A description of the volume. |
| String (Optional) | The name of the volume. |
Example 3.11. Update volume: XML request
<?xml version="1.0" encoding="UTF-8"?>
<snapshot
xmlns="http://docs.openstack.org/openstack-block-storage/2.0/content"
display_name="vol-003" display_description="This is yet, another volume."/>
Example 3.12. Update volume: JSON request
{
"volume":{
"display_name":"vol-003",
"display_description":"This is yet, another volume."
}
}
This operation does not require a request body.
Example 3.13. Update volume: XML response
<?xml version='1.0' encoding='UTF-8'?>
<volume xmlns:atom="http://www.w3.org/2005/Atom"
xmlns="http://docs.openstack.org/api/openstack-block-storage/2.0/content"
status="available" display_name="vol-003" availability_zone="nova"
created_at="2013-02-25 02:40:21"
display_description="This is yet, another volume." volume_type="None"
source_volid="None" snapshot_id="None"
id="5aa119a8-d25b-45a7-8d1b-88e127885635" size="1">
<attachments/>
<metadata>
<meta key="contents">not junk</meta>
</metadata>
</volume>
Example 3.14. Update volume: JSON response
{
"volume":{
"status":"available",
"attachments":[
],
"links":[
{
"href":"http://localhost:8776/v2/0c2eba2c5af04d3f9e9d0d410b371fde/volumes/5aa119a8-d25b-45a7-8d1b-88e127885635",
"rel":"self"
},
{
"href":"http://localhost:8776/0c2eba2c5af04d3f9e9d0d410b371fde/volumes/5aa119a8-d25b-45a7-8d1b-88e127885635",
"rel":"bookmark"
}
],
"availability_zone":"nova",
"source_volid":null,
"snapshot_id":null,
"id":"5aa119a8-d25b-45a7-8d1b-88e127885635",
"display_description":"This is yet, another volume.",
"display_name":"vol-003",
"created_at":"2013-02-25T02:40:21.000000",
"volume_type":"None",
"size":1,
"metadata":{
"contents":"not junk"
}
}
}
This operation does not return a response body.

