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?expanded=update-a-volume-detail#update-a-volume

Request

Parameters

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.
name (Optional) body string The volume name.
description (Optional) body string The volume description.
metadata (Optional) body object One or more metadata key and value pairs to be associated with the new volume.

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

Response

Parameters

Name In Type Description
volume body object A volume object.
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'
  }
]
id body string The UUID of the volume.
links body array The volume links.
name body string The volume name.
size body integer The size of the volume, in gibibytes (GiB).
bootable body string Enables or disables the bootable attribute. You can boot an instance from a bootable volume.
status body string The volume status.
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, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC. In this example, the offset value is -05:00.

availability_zone (Optional) body string The name of the availability zone.
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_type body string The associated volume type name for the volume.
encrypted body boolean If true, this volume is encrypted.
updated_at body string

The date and time when the resource was updated. If the resource has not been updated, this field will be null.

The date and time stamp format is ISO 8601:

CCYY-MM-DDThh:mm:ss±hh:mm

For example, 2015-08-27T09:49:58-05:00.

The ±hh:mm value, if included, is the time zone as an offset from UTC. In this example, the offset value is -05:00.

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.
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.
consistencygroup_id body string The UUID of the consistency group.

Status codes

Success

Code Reason
200 - OK Request was successful.

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
  }
}