華為云計(jì)算 云知識(shí) 更新企業(yè)路由器UpdateEnterpriseRouter
更新企業(yè)路由器UpdateEnterpriseRouter

 

接口說明

更新 企業(yè)路由器 基本信息。

約束說明

除了name和description,其它信息只有在企業(yè)路由器實(shí)例狀態(tài)為available的時(shí)候才能更新。

URL
PUT  https://er.cn-north-4.myhuaweicloud.com/v3/{project_id}/enterprise-router/instances/{er_id} 
請求參數(shù)
名稱 類型 IN 必選 描述
project_id
 
string path

項(xiàng)目ID

er_id
 
string path

企業(yè)路由器實(shí)例ID

Body參數(shù)
名稱 類型 必選 描述
instance
 
UpdateEnterpriseRouter object

更新企業(yè)路由器請求體

參數(shù):
instance
名稱 類型 必選 描述
name
 
string

企業(yè)路由器實(shí)例名稱

description
 
string

企業(yè)路由器實(shí)例描述信息

enable_default_propagation
 
boolean

是否開啟默認(rèn)傳播

enable_default_association
 
boolean

是否開啟默認(rèn)關(guān)聯(lián)

default_propagation_route_table_id
 
string

默認(rèn)傳播路由表ID

default_association_route_table_id
 
string

默認(rèn)關(guān)聯(lián)路由表ID

auto_accept_shared_attachments
 
boolean

是否自動(dòng)接受共享連接創(chuàng)建,默認(rèn)false不開啟

返回參數(shù)
返回碼: 200

OK

名稱 類型 必選 描述
instance
 
EnterpriseRouter object

企業(yè)路由器

request_id
 
string

請求ID

200 instance
名稱 類型 必選 描述
id
 
string

企業(yè)路由器實(shí)例的ID

name
 
string

企業(yè)路由器實(shí)例名稱

description
 
string

企業(yè)路由器實(shí)例描述信息

state
 
string

運(yùn)行狀態(tài)

tags
 
Array of Tag objects

標(biāo)簽信息

charge_mode
 
string

計(jì)費(fèi)模式 按需

created_at
 
string

創(chuàng)建時(shí)間

updated_at
 
string

更新時(shí)間

enterprise_project_id
 
string

企業(yè)項(xiàng)目ID

project_id
 
string

項(xiàng)目ID

asn
 
long

企業(yè)路由器實(shí)例的BGP AS號(hào)

enable_default_propagation
 
boolean

是否開啟默認(rèn)路由表傳播,默認(rèn)false不開啟

enable_default_association
 
boolean

是否開啟默認(rèn)路由表關(guān)聯(lián),默認(rèn)false不開啟

default_propagation_route_table_id
 
string

默認(rèn)傳播路由表id

default_association_route_table_id
 
string

默認(rèn)關(guān)聯(lián)路由表id

availability_zone_ids
 
Array of strings

企業(yè)路由器所在可用區(qū)信息

auto_accept_shared_attachments
 
boolean

是否自動(dòng)接受共享連接創(chuàng)建,默認(rèn)false不開啟

200 instance.tags
名稱 類型 必選 描述
key
 
string

標(biāo)簽鍵,最大長度36個(gè)unicode字符,格式為大小寫字母,數(shù)字,中劃線“-”,下劃線“_”,中文。

value
 
string

標(biāo)簽值,最大長度43個(gè)unicode字符,格式為大小寫字母,數(shù)字,中劃線“-”,下劃線“_”,點(diǎn)“.”,中文。

請求示例
示例 1

更新企業(yè)路由器,開啟默認(rèn)路由表關(guān)聯(lián)和默認(rèn)路由表傳播功能,并指定對應(yīng)的路由表

 
"PUT https://{erouter_endpoint}/v3/08d5a9564a704afda6039ae2babbef3c/enterprise-router/instances/94c2b814-99dc-939a-e811-ae84c61ea3ff"
 
{ "name": "my_er", "description": "this is my first enterprise router", "enable_default_propagation": true, "enable_default_association": true, "default_propagation_route_table_id": "94c2b814-99dc-939a-e811-ae84c61ea3ff", "default_association_route_table_id": "94c2b814-99dc-939a-e811-ae84c61ea3ff" }
返回示例
返回碼:200

OK

示例 1
 
{
"instance": {
"id": "94c2b814-99dc-939a-e811-ae84c61ea3ff",
"name": "my_er",
"description": "this is my first enterprise router",
"project_id": "08d5a9564a704afda6039ae2babbef3c",
"state": "pending",
"asn": 64512,
"enable_default_association": true,
"enable_default_propagation": true,
"default_propagation_route_table_id": "94c2b814-99dc-939a-e811-ae84c61ea3ff",
"default_association_route_table_id": "94c2b814-99dc-939a-e811-ae84c61ea3ff",
"auto_accept_shared_attachments": false,
"availability_zone_ids": [
"az1"
],
"created_at": "2019-09-06 02:11:13Z",
"updated_at": "2019-09-06 02:11:13Z"
},
"request_id": "14c2b814-99dc-939b-e81c-ae84c61ea3f7"
}
SDK
點(diǎn)擊 企業(yè)路由器 (ER) SDK, 下載SDK或查看SDK文檔。SDK的安裝、認(rèn)證方式等在SDK文檔中對應(yīng)語言類型的【使用】目錄下。
錯(cuò)誤碼
請參考 錯(cuò)誤碼說明