VolumeAttach【绑定】

将云硬盘绑定到云主机上:指定云硬盘ID和云主机ID,可将云硬盘绑定到云主机上。

Request Parameters

Parameter name Type Description Required
action String API 标识符 Yes
device String 设备 No
instance String 要绑定到的云主机ID Yes
volume_id String 云硬盘ID Yes

Response Elements

Name Type Description
message String 执行结果信息
code Integer HTTP Resonpe响应状态码

Example

Example Request:

Request Headers:

POST /api/ HTTP/1.1
Origin: https://console.plcloud.com
X-CSRFToken: 6An6xEuOJqW6dVDtlgzZr6FqgkSbJmqp
Content-Type: application/json

JSON Data:

{
    "action": "VolumeAttach",
    "volume_id": "9d288870-301c-479f-8d5e-bfe2c296eadb",
    "instance": "a872157b-4ab1-4f33-b6b0-b269d6667dd3",
    "device": ""
}

Example Response:

{
  "message": "成功",
  "code": 200
}