Help Center/ Elastic Cloud Server/ API Reference/ APIs/ Disk Management/ Listing Disks Attached to an ECS
Updated on 2025-12-10 GMT+08:00

Listing Disks Attached to an ECS

Function

This API is used to list disks attached to an ECS.

Debugging

You can debug this API in API Explorer.

Authorization

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.
  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permissions listed below are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

ecs:cloudServers:listServerVolumeAttachments

list

instance *

-

ecs:cloudServers:get

-

URI

GET /v1/{project_id}/cloudservers/{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.

For details about how to obtain the ID, see Obtaining a Project ID.

server_id

Yes

Specifies the ECS ID in UUID format.

Request

None

Response

Table 2 describes the response parameters.
Table 2 Response parameters

Parameter

Type

Description

volumeAttachments

Array of objects

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

Table 3 volumeAttachments field description

Parameter

Type

Description

device

String

Specifies the drive letter of the EVS disk, displayed as the device name on the console.

For details, see How Do I Obtain My Disk Device Name in the ECS OS Using the Device Identifier Provided on the Console?

id

String

Specifies the mount ID, which is the same as the EVS disk ID.

The value is in UUID format.

serverId

String

Specifies the ECS ID in UUID format.

volumeId

String

Specifies the EVS disk ID in UUID format.

Example Request

List disks attached to an ECS.

GET https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/os-volume_attachments

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"
        }
    ]
}

Error Codes

See Error Codes.