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

 

功能介紹

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

調(diào)試

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

URI

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

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

表1 參數(shù)說明

參數(shù)

是否必選

描述

project_id

項(xiàng)目ID。

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

server_id

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

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

port_id

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

請(qǐng)求參數(shù)

參數(shù)

是否必選

參數(shù)類型

描述

interface_attachment

Object

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

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

參數(shù)

是否必選

參數(shù)類型

描述

delete_on_termination

Boolean

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

請(qǐng)求示例

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

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

無。

響應(yīng)示例

無。

返回值

正常返回值:

返回值

說明

204

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

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

錯(cuò)誤碼

請(qǐng)參考錯(cuò)誤碼。