Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com> Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
14 KiB
Querying Details of a Single Disk Attached to an ECS
Function
This API is used to query details of a single disk attached to an ECS.
This API supports checking fine-grained permissions for enterprise projects. For details, see ecs:cloudServers:showServerBlockDevice.
URI
GET /v1/{project_id}/cloudservers/{server_id}/block_device/{volume_id}
Request
None
Response
Parameter |
Type |
Description |
|---|---|---|
volumeAttachment |
Object |
Specifies the disk attached to an ECS. For details, see Table 3. |
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 mount ID, which is the same as the EVS disk ID. The value is in UUID format. |
size |
Integer |
Specifies the EVS disk size, in GiB. |
device |
String |
Specifies the drive letter of the EVS disk, displayed as the device name on the console. |
pciAddress |
String |
Specifies the PCI address. |
bootIndex |
Integer |
Specifies the EVS disk boot sequence.
|
bus |
String |
Specifies the disk bus type. Options: virtio and scsi |
Example Request
Query information about a specified disk attached to an ECS.
GET https://{endpoint}/v1/{project_id}/cloudservers/{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"
}
}
Returned Values
Error Codes
See Error Codes.