This API is used to add an interface to a router.
Restrictions
PUT /v2.0/routers/{router_id}/add_router_interface
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
subnet_id |
String |
No |
Specifies the subnet ID. Either subnet_id or port_id is used. Use the gateway IP address of the subnet to create a router interface. |
port_id |
String |
No |
Specifies the port ID. Either subnet_id or port_id is used. Use the port IP address to create a router interface. |
Parameter |
Type |
Description |
|---|---|---|
subnet_id |
String |
Specifies the subnet ID. |
tenant_id |
String |
Specifies the project ID. |
project_id |
String |
Specifies the project ID. |
port_id |
String |
Specifies the port ID. |
id |
String |
Specifies the router ID. |
Example request
PUT https://{Endpoint}/v2.0/routers/5b8e885c-1347-4ac2-baf9-2249c8ed1270/add_router_interface
{"subnet_id": "ab78be2d-782f-42a5-aa72-35879f6890ff"}
Example response
{
"subnet_id": "ab78be2d-782f-42a5-aa72-35879f6890ff",
"tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
"project_id": "6fbe9263116a4b68818cf1edce16bc4f",
"port_id": "40e86635-b2a3-45de-a7c8-3cced5b7e755",
"id": "5b8e885c-1347-4ac2-baf9-2249c8ed1270"
}
See Status Codes.
See Error Codes.