Create router
Creates a logical router.
URI
/v2.0/routers
HTTP method
POST
Request parameter
| Key | Description | Type | Required/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 | 
| availability_zone | The Availability Zone name. If you do not specify this, the resource will be created in the default Availability Zone.  | 
             xsd:string | Optional | 
CAUTION:
Do not specify external_gateway_info.
     
   Example request
{
    "router": {
        "name": "another_router",
        "admin_state_up": true,
        "availability_zone": "AZ1"
    }
}    
     
     
   Response status
| Status code | Description | 
|---|---|
| 201 | Normal response codes | 
| badRequest (400) | Error response codes | 
| unauthorized (401) | Error response codes | 
Response body (normal status)
{
    "router": {
        "status": "ACTIVE",
        "external_gateway_info": null,
        "name": "another_router",
        "admin_state_up": true,
        "tenant_id": "6b96ff0cb17a4b859e1e575d221683d3",
        "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 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. | 
| availability_zone | The Availability Zone name |