Create floating IP
Creates a floating IP, and, if you specify port information, associates the floating IP with an internal port.
URI
/v2.0/floatingips
HTTP method
POST
Request parameter
| Key | Description | Type | Required/optional | 
|---|---|---|---|
| floatingip | A floatingip object. | xsd:string | Required | 
| tenant_id | The project ID | xsd:string | Optional | 
| floating_network_id | The ID of the network associated with the floating IP. | csapi:uuid | Required | 
| fixed_ip_address | The fixed IP address associated with the floating IP. | xsd:string | Optional | 
| port_id | The port ID | csapi:uuid | 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 | 
Example request
{
    "floatingip": {
        "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57",
        "port_id": "ce705c24-c1ef-408a-bda3-7bbd946164ab",
        "availability_zone": "AZ1"
    },
}       
     
     
   Response status
| Status code | Description | 
|---|---|
| 201 | Normal response codes | 
| badRequest (400) | Error response codes | 
| unauthorized (401) | Error response codes | 
| conflict (409) | Error response codes | 
Response body (normal status)
{
    "floatingip": {
        "router_id": "d23abc8d-2991-4a55-ba98-2aaea84cc72f",
        "status": "DOWN",
        "tenant_id": "4969c491a3c74ee4af974e6d800c62de",
        "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57",
        "fixed_ip_address": "10.0.0.3",
        "floating_ip_address": "172.24.4.228",
        "port_id": "ce705c24-c1ef-408a-bda3-7bbd946164ab",
        "id": "2f245a7b-796b-4f26-9cf9-9e82d248fda7",
        "availability_zone": "AZ1"
    }
}   
     
     
   Description of response body (normal status)
| Item | Description | 
|---|---|
| floatingip | A floatingip object. | 
| router_id | The router ID. | 
| status | The floatingip status. | 
| tenant_id | The project ID. | 
| floating_network_id | The ID of the network associated with the floating IP. | 
| fixed_ip_address | The fixed IP address associated with the floating IP. | 
| floating_ip_address | The floating IP address. | 
| port_id | The port ID. | 
| id | The floating IP ID. | 
| availability_zone | The Availability Zone name. |