• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Server Volumes Action
  6. Querying Information About Attached Volumes

Querying Information About Attached Volumes

Function Description

This interface is used to query information about the volumes attached to an ECS.

Interface Format

Method

URI

Description

GET

/v2/{tenant_id}/servers/{server_id}/os-volume_attachments

/v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments

Queries information about the volumes attached to an ECS.

NOTE:

Pagination query is not supported.

Restrictions

N/A

Expanded Interface

N/A

Request Parameter

N/A

Response Parameter

Parameter

Type

Mandatory

Description

volumeAttachments

List(Dict)

Yes

Specifies information about the volume attachment information.

volumeAttachments parameter description

Parameter

Type

Mandatory

Description

device

String

Yes

Specifies the name of the device to which the volumes are attached.

serverId

UUID

Yes

Specifies the ECS ID.

id

UUID

Yes

Specifies the attachment ID, which is the same as the volume UUID.

volumeId

UUID

Yes

Specifies the volume UUID.

Request Example

GET /v2/b23b579f08c84228b9b4673c46f0c442/servers/f6c61c09-c754-4874-9371-c19db89678a5/os-volume_attachments 
GET /v2.1/b23b579f08c84228b9b4673c46f0c442/servers/f6c61c09-c754-4874-9371-c19db89678a5/os-volume_attachments 

Response Example

{ 
"volumeAttachments": [
        {
            "device": "/dev/vdb",
            "serverId": "ab258e25-e351-47c7-b6e3-0749c5d9ed6a",
            "id": "54667652-3029-4af8-9222-2d53066fd61c",
            "volumeId": "54667652-3029-4af8-9222-2d53066fd61c"
        }
    ]
}

Returned Values

For details, see section General Request Returned Values.

Error Code

Table 1 Task error code

Error Code

Description

404

Instance could not be found.

The target ECS does not exist.