Listing Disks Attached to an ECS
Function
This API is used to list disks attached to an ECS.
URI
GET /v1/{project_id}/cloudservers/{server_id}/os-volume_attachments
| 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 |
| Parameter | Type | Description |
|---|---|---|
| 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 |
| 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 |
| 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 |
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"
}
]
} 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.