Help Center/ Elastic Cloud Server/ API Reference (Kuala Lumpur Region)/ Out-of-Date APIs/ Disk Management/ Querying a Single Disk Attached to an ECS (Discarded)
Updated on 2022-08-16 GMT+08:00

Querying a Single Disk Attached to an ECS (Discarded)

Function

This API is used to query a disk attached to an ECS.

This API has been discarded. Use the API described in Querying a Single Disk Attached to an ECS.

URI

GET /v2.1/servers/{server_id}/block_device/{volume_id}

Table 1 lists the URI parameters.
Table 1 Parameter description

Parameter

Mandatory

Description

server_id

Yes

Specifies the ECS ID in UUID format.

volume_id

Yes

Specifies the EVS disk ID in UUID format.

Request

None

Response

Table 2 describes the response parameter.
Table 2 Response parameter

Parameter

Type

Description

volumeAttachment

Object

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

Table 3 volumeAttachment parameters

Parameter

Type

Description

serverId

String

Specifies the ECS ID in UUID format.

volumeId

String

Specifies the EVS disk ID in UUID format.

id

String

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

The value is in UUID format.

size

Integer

Specifies the EVS disk size in GB.

device

String

Specifies the drive letter of the EVS disk, which is the device name of the EVS disk.

pciAddress

String

Specifies the PCI address.

bootIndex

Boolean

Specifies the EVS disk boot sequence.

  • 0 indicates the system disk.
  • Values other than 0 indicate a data disk.

bus

String

Specifies the disk bus type.

Options: virtio and scsi

Example Request

GET https://{endpoint}/v2.1/servers/{server_id}/block_device/{volume_id}

Example Response

{
    "volumeAttachment": {
        "pciAddress": "0000:02:01.0",
        "volumeId": "a26887c6-c47b-4654-abb5-asdf234r234r",
        "device": "/dev/vda",
        "serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
        "id": "a26887c6-c47b-4654-abb5-asdf234r234r",
        "size": "40",
        "bootIndex": 0,
        "bus":"virtio"
    }
}

Error Codes

See Error Codes.