forked from laiweijian4/doc-exports
move doc sources to other location Reviewed-by: OpenTelekomCloud Bot <None>
10 KiB
10 KiB
Attaching a Disk to an ECS
Function
This API is used to attach a disk to an ECS.
URI
POST /v1/{project_id}/cloudservers/{server_id}/attachvolume
Table 1 describes the parameters in the URI.
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
volumeAttachment |
Yes |
Object |
Specifies the ECS attachment information. For details, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
volumeId |
Yes |
String |
Specifies the ID of the disk to be attached. The value is in UUID format. |
device |
No |
String |
Indicates the disk device name. NOTE:
|
Response
See Responses (Task).
Example Request
POST https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/attachvolume
{ "volumeAttachment": { "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803", "device": "/dev/sda" } }
Example Response
{ "job_id": "70a599e0-31e7-49b7-b260-868f441e862b" }
Returned Values
Error Codes
See Error Codes.
Parent topic: Disk Management