7.4. Updating volume names¶
PUT /v3/{project_id}/volumes/{volume_id}
Update the name of a volume with the specified ID.
Source: https://docs.openstack.org/api-ref/block-storage/v3/index.html#update-a-volume
7.4.1. Request¶
Name | In | Type | Description |
---|---|---|---|
project_id |
path | string | The UUID of the project in a multi-tenancy cloud. |
volume_id |
path | string | The UUID of the volume. |
volume |
body | object | A volume object. |
description (Optional) |
body | string | The volume description. |
name (Optional) |
body | string | The volume name. |
metadata (Optional) |
body | object | One or more metadata key and value pairs that are associated with the volume. |
7.4.1.1. Example¶
# curl -ks -X PUT -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' -d '
{
"volume": {
"name": "vol3"
}
}' https://<node_IP_addr>:8776/v3/f5d834d636c642c7bfe8af86139c6f26/volumes/de5b7dfc-e3e8-4f14-9969-98d61af40329
7.4.2. Response¶
Name | In | Type | Description |
---|---|---|---|
migration_status (Optional) |
body | string | The volume migration status. Admin only. |
attachments |
body | array | Instance attachment information. If this volume is attached to a server instance, the attachments list includes the UUID of the attached server, an attachment UUID, the name of the attached host, if any, the volume UUID, the device, and the device UUID. Otherwise, this list is empty. For example: [
{
'server_id': '6c8cf6e0-4c8f-442f-9196-9679737feec6',
'attachment_id': '3dafcac4-1cb9-4b60-a227-d729baa10cf6',
'attached_at': '2019-09-30T19:30:34.000000',
'host_name': null,
'volume_id': '5d95d5ee-4bdd-4452-b9d7-d44ca10d3d53',
'device': '/dev/vda',
'id': '5d95d5ee-4bdd-4452-b9d7-d44ca10d3d53'
}
]
|
links |
body | array | The volume links. |
availability_zone (Optional) |
body | string | The name of the availability zone. |
encrypted |
body | boolean | If true, this volume is encrypted. |
updated_at |
body | string | The date and time when the resource was updated. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The If the |
replication_status |
body | string | The volume replication status. |
snapshot_id (Optional) |
body | string | To create a volume from an existing snapshot, specify the UUID of the volume snapshot. The volume is created in same availability zone and with same size as the snapshot. |
id |
body | string | The UUID of the volume. |
size |
body | integer | The size of the volume, in gibibytes (GiB). |
user_id |
body | string | The UUID of the user. |
metadata |
body | object | A metadata object. Contains one or more
metadata key and value pairs that are associated with the volume. |
status |
body | string | The volume status. |
description |
body | string | The volume description. |
multiattach |
body | boolean | If true, this volume can attach to more than one instance. |
source_volid (Optional) |
body | string | The UUID of the source volume. The API creates a new volume with the same size as the source volume unless a larger size is requested. |
volume |
body | object | A volume object. |
consistencygroup_id |
body | string | The UUID of the consistency group. |
name |
body | string | The volume name. |
bootable |
body | string | Enables or disables the bootable attribute. You can boot an instance from a bootable volume. |
created_at |
body | string | The date and time when the resource was created. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The |
volume_type |
body | string | The associated volume type name for the volume. |
7.4.2.2. Example¶
{
"volume": {
"status": "available",
"migration_status": null,
"user_id": "eb481bff7b7c4ec6a686646957d8064b",
"attachments": [],
"links": [
{
"href": "https://<node_IP_addr>:8776/v3/f5d834d636c642c7bfe8af86139c6f26/volumes/de5b7dfc-e3e8-4f14-9969-98d61af40329",
"rel": "self"
},
{
"href": "https://<node_IP_addr>:8776/f5d834d636c642c7bfe8af86139c6f26/volumes/de5b7dfc-e3e8-4f14-9969-98d61af40329",
"rel": "bookmark"
}
],
"availability_zone": "nova",
"bootable": "false",
"encrypted": false,
"created_at": "2020-03-11T12:15:14.476003",
"description": "Volume 2",
"updated_at": "2020-03-11T12:15:19.108340",
"volume_type": "policy1",
"name": "vol3",
"replication_status": null,
"consistencygroup_id": null,
"source_volid": null,
"snapshot_id": null,
"multiattach": false,
"metadata": {},
"id": "de5b7dfc-e3e8-4f14-9969-98d61af40329",
"size": 1
}
}