Update router

仮想ルーターを更新します。

URI

/v2.0/routers/{router_id}

URIの説明:

仮想ルータID

HTTPメソッド

PUT

リクエストパラメタ

キー 説明 必須/省略可
external_gateway_info 外部ゲートウェイのネットワークID xsd:dict Optional
name 仮想ルータ名 xsd:string Optional
admin_state_up ルーターの管理状態

ルーターが稼動中(true)か停止している(false)かを示します。

注意:
falseを設定した場合、仮想ルータを経由した通信はできません。
xsd:bool Optional

注意:
  • create時に「external_gateway_info」は指定しないでください。
  • 既に設定されている「external_gateway_info」の値を変更する場合は、一旦「external_gateway_info」を空の値に変更してください。その後、設定したい「external_gateway_info」の値に変更してください。

リクエスト例


{
    "router": {
        "external_gateway_info": {
            "network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b"
        }
    }
}  
     

レスポンスステータス

ステータスコード 説明
200 Normal response codes
badRequest (400) Error response codes
unauthorized (401) Error response codes
itemNotFound (404) Error response codes
serviceUnavailable (503) Error response codes

注意:
503エラーメッセージが返される場合は、外部ゲートウェイの設定中です。

その場合は約2分後に再度実行してください。

レスポンスボディ(正常系)


{
    "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.1.0.10",
                "destination": "40.0.1.0/24"
            }
        ],
        "availability_zone": "AZ1"
    }
}
     

レスポンスボディ(正常系)の説明

要素名 説明
router routerオブジェクト
status 仮想ルータのステータス
external_gateway_info 外部ゲートウェイのネットワークID
name 仮想ルータ名
admin_state_up ルーターの管理状態

ルーターが稼動中(true)か停止している(false)かを示します。

falseの場合、仮想ルータを経由した通信はできません。

tenant_id プロジェクトID
id ルーターID
routes 静的ルーティングの一覧。書式は以下のとおりです。

静的ルーティング定義:


[
  {
    "nexthop":"IPADDRESS",
    "destination":"CIDR"
  }
]                 
               

next_hopは、宛先に到達するために次に転送すべき隣接するIPアドレスです。

destinationは、宛先のCIDRです。

availability_zone アベイラビリティゾーン名