• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Router
  6. Updating a Router

Updating a Router

Function

This interface is used to update a router.

URI

PUT /v2.0/routers/{router_id}

Request Message

Table 1 Request parameter

Parameter

Type

Mandatory

Description

router

Dict

Yes

Specifies the router list. For details, see Table 1.

This parameter has no mandatory fields. You must specify at least one attribute when updating the router.

Response Message

Table 2 Response parameter

Parameter

Type

Description

router

Dict

Specifies the router list. For details, see Table 1.

Example:

Example request

PUT /v2.0/routers/f5dbdfe0-86f9-4b0a-9a32-6be143f0a076  
{
    "router": {
           "name": "router-220"
    }
}

Example response

{
    "router": {
        "id": "f5dbdfe0-86f9-4b0a-9a32-6be143f0a076",
        "name": "router-220",
        "status": "ACTIVE",
        "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "admin_state_up": true,
        "external_gateway_info": {
            "network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975",
            "enable_snat": false
        },
        "routes": [],
        "created_at": "2018-09-20T02:06:07",
        "updated_at": "2018-09-20T02:06:09"
    }
}

Status Codes

For details, see section Status Codes.