Querying a Disk Attached to an ECS
Function
This API is used to query a disk attached to an ECS based on the disk ID.
URI
GET /v2.1/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}
Table 1 describes the parameters in the URI.
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. |
volume_id | Yes | Specifies the disk ID. |
Request
None
Response
Table 2 describes the response parameters.
Parameter | Type | Description |
---|---|---|
volumeAttachment | Object | Specifies the disks attached to an ECS. For details, see Table 3. |
Parameter | Type | Description |
---|---|---|
device | String | Specifies the attached directory. |
id | String | Specifies the ID of the attached resource. |
serverId | String | Specifies the ECS ID. |
volumeId | String | Specifies the ID of the attached disk. |
Example Request
GET https://{endpoint}/v2.1/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}
Example Response
{"volumeAttachment":{"device": "/dev/sdd","id": "a26887c6-c47b-4654-abb5-dfadf7d3f803","serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0","volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803"}}
Returned Values
- Function
- URI
- Request
- Response
- Example Request
- Example Response
- Returned Values