• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Floating IP Address
  6. Creating a Floating IP Address

Creating a Floating IP Address

Function

This interface is used to create a floating IP address.

You can use GET /v2.0/networks?router:external=True or run the neutron net-external-list command to obtain the UUID of the external network required for creating a floating IP address.

URI

POST /v2.0/floatingips

Request Message

Table 1 Request parameter

Parameter

Type

Mandatory

Description

floatingip

Dict

Yes

Specifies the floating IP address list. For details, see Object Model.

Mandatory field: floating_network_id

Response Message

Table 2 Response parameter

Parameter

Type

Description

floatingip

Dict

Specifies the floating IP address list. For details, see Object Model.

Example:

Example request

POST /v2.0/floatingips 
{
    "floatingip": {
           "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975"
    }
}

Example response

{
    "floatingip": {
        "id": "b997e0d4-3359-4c74-8f88-bc0af81cd5a2",
        "status": "DOWN",
        "router_id": null,
        "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975",
        "fixed_ip_address": null,
        "floating_ip_address": "88.88.215.205",
        "port_id": null,
        "created_at": "2018-09-20T02:10:02",
        "updated_at": "2018-09-20T02:10:02"
    }
}

Status Codes

For details, see section Status Codes.