Update router (Update routing information)
Updates a logical router.
Updates the routing information between different projects within the same domain.
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 |
---|---|---|---|
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. |
xsd:list | MUST |
Example request
{
"router": {
"routes": [
{
"nexthop":"10.54.249.65",
"destination":"0.0.0.0/0"
},
{
"nexthop":"10.54.249.65",
"destination":"10.54.249.128/26"
}
]
}
}
Response status
Status code | Description |
---|---|
200 | Normal response codes |
badRequest (400) | Error response codes |
unauthorized (401) | Error response codes |
forbidden (403) | Error response codes |
itemNotFound (404) | Error response codes |
Response body (normal status)
{
"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"
}
}
Description of response body (normal status)
Item | Description |
---|---|
router | A routers object. |
status | The router status. |
external_gateway_info | The network_id, for the external gateway. |
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 |
Notes
If a logical router outside the domain to which the user belongs is specified, an error will occur. (response code: 403)