• Elastic Cloud Server

ecs
  1. Help Center
  2. Elastic Cloud Server
  3. API Reference
  4. OpenStack Nova APIs
  5. Disk Management
  6. Querying Disks Attached to an ECS

Querying Disks Attached to an ECS

Function Description

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

URI

GET /v2/{project_id}/servers/{server_id}/os-volume_attachments

GET /v2.1/{project_id}/servers/{server_id}/os-volume_attachments

Table 1 describes the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

server_id

Yes

Specifies the ECS ID.

Request

N/A

Response

Response parameters

Table 2 describes the response parameters.
Table 2 Response parameters

Parameter

Type

Description

volumeAttachments

List data structure

Specifies the volumes attached to an ECS. For details, see Table 3.

Table 3 volumeAttachments field description

Parameter

Type

Description

device

String

Specifies the attached directory.

id

String

Specifies the ID of the attached resource.

serverId

String

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

volumeId

String

Specifies the ID of the attached disk.

Examples

  • Example response
    {
        "volumeAttachments": [
    {
                "device": "/dev/sdd",
                "id": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
                "serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
                "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803"
            }, 
    {
                "device": "/dev/sdc",
                "id": "a26887c6-c47b-4654-abb5-dfadf7d3f804",
                "serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
                "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f804"
                }
        ]
                }

Returned Values

See General Request Returned Values.