Update router
Updates a logical router.
URI
/v2.0/routers/{router_id}
Description of the URI:
{router_id} UUID The UUID of the router.
HTTP method
PUT
Request parameter
| Key | Description | Type | Required/optional | 
|---|---|---|---|
| external_gateway_info | The network_id, for the external gateway. | xsd:dict | Optional | 
| name | The router name. | xsd:string | Optional | 
| admin_state_up | The administrative state of the router, which is up (true) or down (false). | xsd:bool | Optional | 
CAUTION:
- Do not specify "external_gateway_info".
 - To change the value of an already set "external_gateway_info", temporarily set "external_gateway_info" as a blank value. After that, change the value to that of the "external_gateway_info" that you want to set.
 
Example request
{
    "router": {
        "external_gateway_info": {
            "network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b"
        }
    }
}  
     
     
   Response status
| Status code | Description | 
|---|---|
| 200 | Normal response codes | 
| badRequest (400) | Error response codes | 
| unauthorized (401) | Error response codes | 
| itemNotFound (404) | Error response codes | 
| serviceUnavailable (503) | Error response codes
                CAUTION: 
If 503 error message returned, when external gateway is being configured. 
               
             Please try it again about 2 minutes later.  | 
           
Response body (normal status)
       {
       "router": {
       "status": "ACTIVE",
       "external_gateway_info": {
       "network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b",
       "enable_snat": true,
       "external_fixed_ips": [
       {
       "subnet_id": "41dc310d-52a2-42ab-a193-1564c0cf8cc6",
       "ip_address": "133.162.136.103"
       }
       ]
       },
       "name": "another_router",
       "admin_state_up": true,
       "tenant_id": "6b96ff0cb17a4b859e1e575d221683d3",
       "routes": [
       {
       "nexthop": "10.1.0.10",
       "destination": "40.0.1.0/24"
       }
       ], 
       "id":"8604a0de-7f6b-409a-a47c-a1cc7bc77b2e",
       "availability_zone": "AZ1"
       }
       }
     
     
   Description of response body (normal status)
| Item | Description | 
|---|---|
| router | A router object. | 
| status | The router status. | 
| external_gateway_info | The external gateway information of the router. If the router has an external gateway, this would be a dict with network_id, enable_snat and external_fixed_ips. Otherwise, this would be null. | 
| name | The router name. | 
| admin_state_up | The administrative state of the router, which is up (true) or down (false). | 
| tenant_id | The project ID. | 
| id | The router ID. | 
| routes | List of dictionary(static route definitions) in this format:Static route definitions: next_hop is the IP address of the next hop. destination is the destination CIDR.  | 
            
| availability_zone | The Availability Zone name |