華為云計(jì)算 云知識(shí) 刪除云服務(wù)器網(wǎng)卡NovaDetachInterface
刪除云服務(wù)器網(wǎng)卡NovaDetachInterface

 

功能介紹

根據(jù)指定的Port ID,從 云服務(wù)器 中卸載網(wǎng)卡。

接口約束

主網(wǎng)卡是彈性云服務(wù)器上配置了路由規(guī)則的網(wǎng)卡,不可刪除。

當(dāng)云服務(wù)器網(wǎng)卡被卸載時(shí),通過(guò) Openstack Nova API指定 port_id 參數(shù)掛載的網(wǎng)卡會(huì)保留,通過(guò)指定 net_id 掛載的網(wǎng)卡會(huì)被刪除。

調(diào)試

您可以在API Explorer中調(diào)試該接口。

URI

DELETE /v2.1/{project_id}/servers/{server_id}/os-interface/{port_id}

參數(shù)說(shuō)明請(qǐng)參見(jiàn)表1。
表1 參數(shù)說(shuō)明

參數(shù)

是否必選

描述

project_id

項(xiàng)目ID。

獲取方法請(qǐng)參見(jiàn)獲取項(xiàng)目ID。

server_id

云服務(wù)器ID。

port_id

網(wǎng)卡Port ID。

說(shuō)明:

當(dāng)該ID為云服務(wù)器主網(wǎng)卡ID,將返回403。

請(qǐng)求消息

無(wú)

響應(yīng)消息

無(wú)

請(qǐng)求示例

卸載云服務(wù)器中指定Port ID的網(wǎng)卡。

DELETE https://{endpoint}/v2.1/{project_id}/servers/{server_id}/os-interface/{port_id}

響應(yīng)示例

無(wú)

返回值

請(qǐng)參考通用請(qǐng)求返回值。