Update router(ルーティング情報の更新)
仮想ルータを更新します。
同一ドメイン内の異なるテナント間のルーティング情報を更新します。
URI
/v2.0/routers/{router_id}
URIの説明:
仮想ルータID
HTTPメソッド
PUT
リクエストパラメタ
| キー | 説明 | 型 | 必須/省略可 |
|---|---|---|---|
| routes | 静的ルーティングの一覧。書式は以下のとおりです。
静的ルーティング定義:
next_hopは、宛先に到達するために次に転送すべき隣接するIPアドレスです。 destinationは、宛先のCIDRです。 |
xsd:list | MUST |
リクエスト例
{
"router": {
"routes": [
{
"nexthop":"10.54.249.65",
"destination":"0.0.0.0/0"
},
{
"nexthop":"10.54.249.65",
"destination":"10.54.249.128/26"
}
]
}
}
レスポンスステータス
| ステータスコード | 説明 |
|---|---|
| 200 | Normal response codes |
| badRequest (400) | Error response codes |
| unauthorized (401) | Error response codes |
| forbidden (403) | Error response codes |
| itemNotFound (404) | Error response codes |
レスポンスボディ(正常系)
{
"router": {
"status": "ACTIVE",
"external_gateway_info": {
"network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b"
},
"name": "another_router",
"admin_state_up": true,
"tenant_id": "6b96ff0cb17a4b859e1e575d221683d3",
"id": "8604a0de-7f6b-409a-a47c-a1cc7bc77b2e",
"routes": [
{
"nexthop":"10.54.249.65",
"destination":"0.0.0.0/0"
},
{
"nexthop":"10.54.249.65",
"destination":"10.54.249.128/26"
}
],
"availability_zone": "AZ1"
}
}
レスポンスボディ(正常系)の説明
| 要素名 | 説明 |
|---|---|
| router | routersオブジェクト |
| status | 仮想ルータのステータス |
| external_gateway_info | 外部ゲートウェイのネットワークID |
| name | 仮想ルータ名 |
| admin_state_up | ルーターの管理状態
ルーターが稼動中(true)か停止している(false)かを示します。 |
| tenant_id | プロジェクトID |
| id | 仮想ルータID |
| routes | 静的ルーティングの一覧。書式は以下のとおりです。
静的ルーティング定義:
next_hopは、宛先に到達するために次に転送すべき隣接するIPアドレスです。 destinationは、宛先のCIDRです。 |
| availability_zone | アベイラビリティゾーン名 |
注意事項
利用者が所属するドメイン以外の論理ルータを指定した場合、エラーとなります。(レスポンスステータス:403)