華為云計算 云知識 修改裸金屬服務(wù)器彈性網(wǎng)卡的屬性UpdateBaremetalServerInterfaceAttachments
修改裸金屬服務(wù)器彈性網(wǎng)卡的屬性UpdateBaremetalServerInterfaceAttachments

 

功能介紹

修改 裸金屬服務(wù)器 所綁定的彈性網(wǎng)卡屬性:終止時刪除,即刪除裸金屬服務(wù)器,或者解綁網(wǎng)卡時是否刪除該網(wǎng)卡。

調(diào)試

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

URI

PUT /v1/{project_id}/baremetalservers/{server_id}/os-interface/{port_id}

參數(shù)說明請參見表1 參數(shù)說明。

表1 參數(shù)說明

參數(shù)

是否必選

描述

project_id

項目ID。

獲取方式請參見獲取項目ID。

server_id

裸金屬服務(wù)器ID。

可以從裸金屬服務(wù)器控制臺查詢,或者通過調(diào)用查詢裸金屬服務(wù)器列表(OpenStack原生)API獲取。

port_id

裸金屬服務(wù)器綁定的網(wǎng)卡ID。

請求參數(shù)

參數(shù)

是否必選

參數(shù)類型

描述

interface_attachment

Object

需要修改的網(wǎng)卡參數(shù),詳情請參見表2。

表2 interface_attachment字段數(shù)據(jù)結(jié)構(gòu)說明

參數(shù)

是否必選

參數(shù)類型

描述

delete_on_termination

Boolean

刪除裸金屬服務(wù)器或解綁網(wǎng)卡時是否刪除該網(wǎng)卡。

請求示例

修改網(wǎng)卡屬性,刪除裸金屬服務(wù)器或解綁網(wǎng)卡時不刪除該網(wǎng)卡。
{
    "interface_attachment" : {
        "delete_on_termination": false
    }
}

響應(yīng)參數(shù)

無。

響應(yīng)示例

無。

返回值

正常返回值:

返回值

說明

204

服務(wù)器已成功處理了請求。

其他返回值請參考狀態(tài)碼。

錯誤碼

請參考錯誤碼。