This API is used to attach an EVS disk to a BMS.
POST /v2.1/{project_id}/servers/{server_id}/os-volume_attachments
Table 1 lists the parameters.
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For how to obtain the project ID, see Obtaining Required Information. |
server_id |
Yes |
Specifies the BMS ID. You can obtain the BMS ID from the BMS console or using the Querying BMSs (Native OpenStack API) API. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
volumeAttachment |
Yes |
Object |
Specifies the disks to be attached. For details, see Table 2. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
volumeId |
Yes |
String |
Specifies the ID of the disk to be attached to a BMS. |
device |
No |
String |
Specifies the mount point, such as /dev/sda and /dev/sdb. The new disk mount point cannot be the same as an existing one. The mount point must be specified based on the sequence of existing device names. Otherwise, the system automatically generates a mount point. |
1 | POST https://{ECS Endpoint}/v2.1/c685484a8cc2416b97260938705deb65/servers/95bf2490-5428-432c-ad9b-5e3406f869dd/os-volume_attachments |
1 2 3 4 5 6 | { "volumeAttachment": { "volumeId": "b53f23bd-ee8f-49ec-9420-d1acfeaf91d6", "device": "/dev/sdb" } } |
Parameter |
Type |
Description |
---|---|---|
volumeAttachment |
Object |
Specifies the disks attached to a BMS. For details, see Table 3. |
Parameter |
Type |
Description |
---|---|---|
device |
String |
Specifies the device name, for example, /dev/vdb. |
serverId |
String |
Specifies the ID of the BMS to which the disk is to be attached. The ID is in UUID format. |
id |
String |
Specifies the disk UUID. |
volumeId |
String |
Specifies the attaching ID, which is the same as the UUID. |
1 2 3 4 5 6 7 8 | { "volumeAttachment": { "id": "b53f23bd-ee8f-49ec-9420-d1acfeaf91d6", "volumeId": "b53f23bd-ee8f-49ec-9420-d1acfeaf91d6", "serverId": "820abbd0-2d8e-4bc5-ae46-69cacfd4fbaa", "device": "/dev/vdb" } } |
Returned Values |
Description |
---|---|
200 |
The request has been successfully processed. |
For details about other returned values, see Status Codes.
See Error Codes.