Add interface to router

Adds an internal interface to a logical router.

URI

/v2.0/routers/{router_id}/add_router_interface

Description of the URI:

{router_id} UUID The UUID of the router.

HTTP method

PUT

Request parameter

Key Description Type Required/optional
subnet_id The subnet ID.

(exclusive with port_id)

csapi:UUID Optional
port_id The port ID.

(exclusive with subnet_id)

csapi:UUID Optional

CAUTION:

You must specify either subnet_id or port_id

CAUTION:
Do not add the first interface after consecutively creating the router. Please issue it after receiving the API response.

Example request


{
    "subnet_id": "a2f1f29d-571b-4533-907f-5803ab96ead1"
}   
     

Response status

Status code Description
200 Normal response codes
badRequest (400) Error response codes
unauthorized (401) Error response codes
itemNotFound (404) Error response codes
conflict (409) Error response codes

Response body (normal status)


{
    "subnet_id": "a2f1f29d-571b-4533-907f-5803ab96ead1",
    "port_id": "3a44f4e5-1694-493a-a1fb-393881c673a4",
    "tenant_id": "6b96ff0cb17a4b859e1e575d221683d3",
    "id": "8604a0de-7f6b-409a-a47c-a1cc7bc77b2e",
    "availability_zone": "AZ1"
}
     

Description of response body (normal status)

Item Description
subnet_id The subnet ID
port_id The port ID
tenant_id The project ID
id The router ID
availability_zone The Availability Zone name