Listing Details About Disks Attached to an ECS
Function
This API is used to list details about disks attached to an ECS.
Debugging
You can debug this API in API Explorer.
Authorization
- 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}/block_device
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
project_id |
Yes |
Definition Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
|
server_id |
Yes |
Definition Specifies the ECS ID in UUID format. Constraints N/A Range N/A Default Value N/A |
Request
None
Response
|
Parameter |
Type |
Description |
|---|---|---|
|
volumeAttachments |
Array of objects |
Definition Specifies the disks attached to an ECS. For details, see Table 3. Range N/A |
|
attachableQuantity |
Object |
Definition Specifies the number of disks that can be attached to an ECS. For details, see Table 4. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
serverId |
String |
Definition Specifies the ECS ID in UUID format. Range N/A |
|
volumeId |
String |
Definition Specifies the EVS disk ID in UUID format. Range N/A |
|
id |
String |
Definition Specifies the mount ID, which is the same as the EVS disk ID. The value is in UUID format. Range N/A |
|
size |
Integer |
Definition Specifies the EVS disk size, in GiB. Range N/A |
|
device |
String |
Definition 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? Range N/A |
|
pciAddress |
String |
Definition Specifies the PCI address. Range N/A |
|
bootIndex |
Integer |
Definition Specifies the EVS disk boot sequence. Range
|
|
bus |
String |
Definition Specifies the disk bus type. Range
|
|
Parameter |
Type |
Description |
|---|---|---|
|
free_scsi |
Integer |
Definition Specifies the number of SCSI disks that can be attached to an ECS. Range N/A |
|
free_blk |
Integer |
Definition Specifies the number of virtio_blk disks that can be attached to an ECS. Range N/A |
|
free_disk |
Integer |
Definition Specifies the total number of disks that can be attached to an ECS. Range N/A |
Example Request
List details about disks attached to an ECS.
GET https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/block_device
Example Response
{
"attachableQuantity": {
"free_scsi": 23,
"free_blk": 15,
"free_disk": 23
},
"volumeAttachments": [
{
"pciAddress": "0000:02:01.0",
"volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
"device": "/dev/vda",
"serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
"id": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
"size": 40,
"bootIndex": 0,
"bus":"virtio"
},
{
"pciAddress": "0000:02:02.0",
"volumeId": "a26887c6-c47b-4654-abb5-asdf234r234r",
"device": "/dev/vdb",
"serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
"id": "a26887c6-c47b-4654-abb5-asdf234r234r",
"size": 10,
"bootIndex": 1,
"bus":"virtio"
}
]
}
Returned Values
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot