Showing volume details

GET /v3/{project_id}/volumes/{volume_id}

Show the details of a volume with the specified ID.

Source: https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded=show-a-volume-s-details-detail#show-a-volume-s-details

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.

Example

# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:8776/v3/f5d834d636c642c7bfe8af86139c6f26/volumes/76736e1a-ad97-4599-8ca8-476650459310

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.
service_uuid body string

A unique identifier that’s used to indicate what node the volume-service for a particular volume is being serviced by.

New in version 3.48

shared_targets body boolean

An indicator whether the back-end hosting the volume utilizes shared_targets or not. Default is True.

New in version 3.48

os-vol-host-attr:host (Optional) body string Current back-end of the volume. Host format is host@backend#pool.
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.
os-vol-tenant-attr:tenant_id body string The project ID which the volume belongs to.
os-vol-mig-status-attr:migstat (Optional) body string The status of this volume migration (None means that a migration is not currently in progress).
os-vol-mig-status-attr:name_id (Optional) body string The volume ID that this volume name on the backend is based on.
metadata body object A metadata object. Contains one or more metadata key and value pairs that are associated with the volume.
volume_image_metadata (Optional) body object List of image metadata entries. Only included for volumes that were created from an image, or from a snapshot of a volume originally created from an image.
consistencygroup_id body string The UUID of the consistency group.

Status codes

Success

Code Reason
200 - OK Request was successful.

Error

Code Reason
401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

Example

{
  "volume": {
    "migration_status": null,
    "attachments": [
      {
        "server_id": "e1ae6f7e-c35d-4656-a4fd-2371f9a791d4",
        "attachment_id": "90d2562a-635b-4db0-a1eb-5f4bffe0c73c",
        "attached_at": "2020-03-04T13:21:18.367315",
        "host_name": null,
        "volume_id": "76736e1a-ad97-4599-8ca8-476650459310",
        "device": "/dev/vda",
        "id": "76736e1a-ad97-4599-8ca8-476650459310"
      }
    ],
    "links": [
      {
        "href": "https://<node_IP_addr>:8776/v3/f5d834d636c642c7bfe8af86139c6f26/volumes/76736e1a-ad97-4599-8ca8-476650459310",
        "rel": "self"
      },
      {
        "href": "https://<node_IP_addr>:8776/f5d834d636c642c7bfe8af86139c6f26/volumes/76736e1a-ad97-4599-8ca8-476650459310",
        "rel": "bookmark"
      }
    ],
    "availability_zone": "nova",
    "os-vol-host-attr:host": "node1.vstoragedomain@vstorage#vstorage",
    "encrypted": false,
    "updated_at": "2020-03-04T13:21:18.415069",
    "replication_status": null,
    "snapshot_id": null,
    "id": "76736e1a-ad97-4599-8ca8-476650459310",
    "size": 1,
    "user_id": "eb481bff7b7c4ec6a686646957d8064b",
    "os-vol-tenant-attr:tenant_id": "f5d834d636c642c7bfe8af86139c6f26",
    "os-vol-mig-status-attr:migstat": null,
    "metadata": {
      "applied-storage-policy": "2020-01-31T12:14:46.143657",
      "attached_mode": "rw"
    },
    "status": "in-use",
    "volume_image_metadata": {
      "os_distro": "linux",
      "image_validated": "yes",
      "container_format": "bare",
      "min_ram": "0",
      "disk_format": "qcow2",
      "image_name": "cirros",
      "trait:CUSTOM_HCI_122E856B9E9C4D80A0F8C21591B5AFCB": "required",
      "image_id": "c92d820c-50dc-4fd1-a0bc-2f1071487b67",
      "checksum": "443b7623e27ecf03dc9e01ee93f67afe",
      "min_disk": "1",
      "os_type": "linux",
      "hw_disk_bus": "virtio",
      "size": "12716032"
    },
    "description": "Instance-e1ae6f7e-c35d-4656-a4fd-2371f9a791d4",
    "multiattach": false,
    "source_volid": null,
    "consistencygroup_id": null,
    "os-vol-mig-status-attr:name_id": null,
    "name": "vm1/cirros/Boot volume",
    "bootable": "true",
    "created_at": "2020-03-04T13:21:10.245192",
    "volume_type": "policy1"
  }
}