功能介紹
更新路由表。
調(diào)試
您可以在API Explorer中調(diào)試該接口。
URI
PUT /v1/{project_id}/routetables/{routetable_id}
參數(shù)說(shuō)明請(qǐng)參見(jiàn)表1。
|
名稱 |
是否必選 |
參數(shù)類(lèi)型 |
說(shuō)明 |
|---|---|---|---|
|
project_id |
是 |
String |
項(xiàng)目ID,請(qǐng)參見(jiàn)獲取項(xiàng)目ID。 |
|
routetable_id |
是 |
String |
路由表ID,路由表唯一標(biāo)識(shí) |
請(qǐng)求參數(shù)
|
名稱 |
是否必選 |
參數(shù)類(lèi)型 |
說(shuō)明 |
|---|---|---|---|
|
routetable |
是 |
|
名稱 |
是否必選 |
參數(shù)類(lèi)型 |
說(shuō)明 |
|---|---|---|---|
|
name |
否 |
String |
|
|
description |
否 |
String |
|
|
routes |
否 |
|
名稱 |
是否必選 |
參數(shù)類(lèi)型 |
說(shuō)明 |
|---|---|---|---|
|
type |
是 |
String |
|
|
destination |
是 |
String |
|
|
nexthop |
是 |
String |
|
|
description |
否 |
String |
|
|
參數(shù) |
是否必選 |
參數(shù)類(lèi)型 |
說(shuō)明 |
|---|---|---|---|
|
type |
是 |
String |
|
|
destination |
是 |
String |
|
|
nexthop |
是 |
String |
|
|
description |
否 |
String |
|
|
參數(shù) |
是否必選 |
參數(shù)類(lèi)型 |
說(shuō)明 |
|---|---|---|---|
|
type |
否 |
String |
|
|
destination |
是 |
String |
|
|
nexthop |
否 |
String |
|
|
description |
否 |
String |
|
請(qǐng)求示例
- 更新id為3d42a0d4-a980-4613-ae76-a2cddecff054的路由表,新增一條ecs類(lèi)型的路由,修改一條ecs類(lèi)型的路由,刪除一條目的網(wǎng)段為20.20.10.0/24的路由。
PUT https://{Endpoint}/v1/6fbe9263116a4b68818cf1edce16bc4f/routetables/3d42a0d4-a980-4613-ae76-a2cddecff054 { "routetable": { "name": "routertable-789", "description": "abc", "routes": { "add": [ { "type": "ecs", "destination": "10.10.10.0/24", "nexthop": "7c50463d-d36c-4417-aa85-cc11fa10f341", "description": "abc" } ], "mod": [ { "type": "ecs", "destination": "20.10.10.0/24", "nexthop": "7c50463d-d36c-4417-aa85-cc11fa10f341", "description": "abc" } ], "del": [ { "destination": "20.20.10.0/24" } ] } } }
響應(yīng)參數(shù)
|
名稱 |
參數(shù)類(lèi)型 |
說(shuō)明 |
|---|---|---|
|
id |
String |
|
|
name |
String |
|
|
default |
Boolean |
|
|
routes |
Array of route objects |
|
|
subnets |
Array of subnet objects |
|
|
tenant_id |
String |
|
|
vpc_id |
String |
|
|
description |
String |
|
|
created_at |
String |
|
|
updated_at |
String |
|
|
名稱 |
參數(shù)類(lèi)型 |
說(shuō)明 |
|---|---|---|
|
type |
String |
|
|
destination |
String |
|
|
nexthop |
String |
|
|
description |
String |
|
|
名稱 |
參數(shù)類(lèi)型 |
說(shuō)明 |
|---|---|---|
|
id |
String |
路由表關(guān)聯(lián)的子網(wǎng)ID |
響應(yīng)示例
{
"routetable": {
"id": "3d42a0d4-a980-4613-ae76-a2cddecff054",
"vpc_id": "ab78be2d-782f-42a5-aa72-35879f6890ff",
"description": "abc",
"routes": [
{
"type": "ecs",
"destination": "10.10.10.0/24",
"nexthop": "7c50463d-d36c-4417-aa85-cc11fa10f341",
"description": "abc"
}
],
"subnets": [
{
"id": "8d4ce32f-d68a-4c4c-9f18-c68d8a5c7f2f"
}
],
"tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
"created_at": "2022-12-15T02:56:40",
"updated_at": "2022-12-15T03:03:42"
}
}
狀態(tài)碼
請(qǐng)參見(jiàn)狀態(tài)碼。
錯(cuò)誤碼
請(qǐng)參考錯(cuò)誤碼。
- 通過(guò)企業(yè)路由器和云專線實(shí)現(xiàn)線下IDC和云上VPC互通_ER快速入門(mén)_ER用戶指南
- ER是什么_企業(yè)路由器ER有什么優(yōu)勢(shì)_企業(yè)路由器ER有什么功能
- NAT網(wǎng)關(guān)快速入門(mén)_NAT網(wǎng)關(guān)用戶指南_NAT網(wǎng)關(guān)常見(jiàn)問(wèn)題
- 使用NAT網(wǎng)關(guān)的過(guò)程中有哪些常見(jiàn)問(wèn)題_公網(wǎng)NAT_私網(wǎng)NAT_入門(mén)_常見(jiàn)為題-華為云
- 什么是VPC_創(chuàng)建VPC_VPC 是什么
最新文章
- VPC路由表_如何使用VPC路由表_控制路由-華為云
- 函數(shù)工作流自動(dòng)更新ECS證書(shū)_ECS證書(shū)自動(dòng)更新_彈性云服務(wù)器
- 如何使用公網(wǎng)NAT網(wǎng)關(guān)通過(guò)多網(wǎng)關(guān)擴(kuò)展容量_NAT網(wǎng)關(guān)免費(fèi)嗎_NAT網(wǎng)關(guān)使用指導(dǎo)
- 通過(guò)企業(yè)路由器構(gòu)建DC/VPN雙鏈路主備混合云組網(wǎng)_企業(yè)路由器工作原理_如何使用ER
- 企業(yè)路由器ER是什么意思_ER的功能_如何使用企業(yè)路由器ER
- 將VPC對(duì)等連接遷移至企業(yè)路由器ER_企業(yè)路由器ER使用指導(dǎo)_企業(yè)路由器產(chǎn)品功能
