• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Volumes
  6. Querying Volume Information

Querying Volume Information

Function Description

This interface is used to query information about a specified disk.

URI

  • URI format

    GET /v2/{tenant_id}/os-volumes/{volume_id}

    GET /v2.1/{tenant_id}/os-volumes/{volume_id}

  • Parameter description

    Parameter

    Mandatory

    Description

    tenant_id

    Yes

    Specifies the tenant or project ID.

    volume_id

    Yes

    Specifies the volume ID.

Restrictions

This interface will become invalid from micro version 2.36. Since this version, the system will return error 404 when you invoke this interface. Using the corresponding storage service interface is recommended.

Request

N/A

Response

Parameter

Type

Mandatory

Description

id

String

Yes

Specifies the disk ID in UUID format.

displayName

String

No

Specifies the volume name.

status

String

Yes

Specifies the volume status.

attachments

List

No

Specifies the attachment information about a volume.

availabilityZone

String

Yes

Specifies the AZ to which the volume belongs.

createdAt

String

Yes

Specifies the time when the volume was created.

displayDescription

String

No

Specifies the volume description.

volumeType

String

Yes

Specifies the volume type.

snapshotId

String

No

Specifies the snapshot ID.

metadata

Dict

Yes

Specifies the volume metadata.

size

Int

Yes

Specifies the volume size.

Table 1 attachments field description

Parameter

Type

Description

device

String

Specifies the directory to which the volume is mounted.

id

String

Specifies the ID of the attached resource.

serverId

String

Specifies the ID of the ECS to which the volume is attached.

volumeId

String

Specifies the ID of the attached volume.

Request Example

GET /v2/b84c367e4d1047fc9b54f28b400ddbc2/os-volumes/70b14513-faad-4646-b7ab-a065cef282b4

GET /v2.1/b84c367e4d1047fc9b54f28b400ddbc2/os-volumes/70b14513-faad-4646-b7ab-a065cef282b4

Response Example

{
    "volume": 
    {
        "status": "available",
        "attachments": [{}],
        "availabilityZone": "nova",
        "createdAt": "2016-05-20T07:57:56.299000",
        "displayDescription": null,
        "volumeType": null,
        "dispalyName": "test",
        "snapshotId": null,
        "metadata": {},
        "id": "70b14513-faad-4646-b7ab-a065cef282b4",
        "size": 1    
    }
}

Returned Values

See General Request Returned Values.