Method | URI | Description |
---|---|---|
POST | /v2/{tenant_id}/servers/{server_id}/os-volume_attachments | Attaches a volume to the specified server. |
Normal response codes: 202
Error response codes: computeFault (400, 500, …), serviceUnavailable (503), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), itemNotFound (404), badMediaType (415), buildInProgress (409)
This table shows the URI parameters for the attach volume request:
Name | Type | Description |
---|---|---|
| String | The ID for the tenant or account in a multi-tenancy cloud. |
| UUID | The UUID for the server of interest to you. |
| String | ID of the volume to attach. |
| String | Name of the device such as, /dev/vdb. Use "auto" for auto-assign (if supported). |
| String | A dictionary representation of a volume attachment. |
Example 3.366. Attach volume: XML request
<?xml version="1.0" encoding="UTF-8"?> <volumeAttachment volumeId="a26887c6-c47b-4654-abb5-dfadf7d3f803" device="/dev/vdd" />
Example 3.367. Attach volume: JSON request
{ "volumeAttachment": { "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803", "device": "/dev/vdd" } }
Example 3.368. Attach volume: XML response
<?xml version='1.0' encoding='UTF-8'?> <volumeAttachment device="/dev/vdd" serverId="20f0cb44-7b00-4019-a612-364777cd2931" id="a26887c6-c47b-4654-abb5-dfadf7d3f803" volumeId="a26887c6-c47b-4654-abb5-dfadf7d3f803"/>
Example 3.369. Attach volume: JSON response
{ "volumeAttachment": { "device": "/dev/vdd", "id": "a26887c6-c47b-4654-abb5-dfadf7d3f803", "serverId": "0c92f3f6-c253-4c9b-bd43-e880a8d2eb0a", "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803" } }