• Native OpenStack API

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

Querying Information About an Attached ECS

Function Description

This interface is used to query information about a volume attached to an ECS.

Interface Format

Method

URI

Description

GET

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

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

Queries information about a volume attached to an ECS.

Restrictions

N/A

Expanded Interface

N/A

Request Parameter

N/A

Response Parameter

Parameter

Type

Mandatory

Description

volumeAttachment

Dict

Yes

Specifies the name of the device to which the volume is attached.

volumeAttachment information

Parameter

Type

Mandatory

Description

device

String

Yes

Specifies the name of the device to which the volume is attached.

serverId

UUID

Yes

Specifies the ECS ID.

id

UUID

Yes

Specifies an ID in the response that is the same as the volume ID.

volumeId

UUID

Yes

Specifies the volume ID.

Request Example

GET /v2/6fbe9263116a4b68818cf1edce16bc4f/servers/ab258e25-e351-47c7-b6e3-0749c5d9ed6a/os-volume_attachments/54667652-3029-4af8-9222-2d53066fd61c
GET /v2.1/6fbe9263116a4b68818cf1edce16bc4f/servers/ab258e25-e351-47c7-b6e3-0749c5d9ed6a/os-volume_attachments/54667652-3029-4af8-9222-2d53066fd61c

Response Example

{
"volumeAttachment": 
        {
            "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.