DetachInterface【移除网卡】¶
移除云主机网卡:可根据云主机ID和端口ID来移除网卡。 如果不指定任何移除条件,则会返回错误信息。
Request Parameters
Parameter name | Type | Description | Required |
---|---|---|---|
action | String | API 标识符 | Yes |
obj_id | String | 云主机 ID | Yes |
port_id | String | 网卡 ID | Yes |
Response Elements
Name | Type | Description |
---|---|---|
message | String | 执行结果信息 |
code | Integer | HTTP Resonpe响应状态码 |
data | Array | JSON 格式的云主机 IP 信息列表,每项参数可见下面 Data Item |
Data Item
Name | Type | Description |
---|---|---|
instance_id | String | 云主机 ID |
addresses | Array | 内网 IP地址 |
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": "DetachInterface",
"obj_id": "8074edee-a3de-48b2-be0d-3ead131ac399",
"port_id": "27eb5848-6a4c-4d93-9106-dc48c67a14c8"
}
Example Response:
{
"message": "成功",
"code": 200,
"data": [
{
"instance_id": "8074edee-a3de-48b2-be0d-3ead131ac399",
"addresses": [
"192.168.100.5"
]
}
]
}