• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Floating IP
  6. Update floating IP

Update floating IP

Function Description

This interface is used to update a floating IP address.

Interface Format

Method

URI

Description

PUT

/v2.0/floatingips/{floatingip_id}

Updates a specified floating IP address and the port associated with the address.

Restrictions

When the floating IP address is associated, try to disassociate the floating IP address if the floating IP address is in the error state.

You are not allowed to bind a floating IP address that has been bound to a port to another port. You must first unbind the IP address from its original port and bind it to the required port.

Request Parameter

Parameter

Type

Mandatory

Description

floatingip

Dict

Yes

Specifies the floating IP address. For details, see Table 1. Parameters floatingip and port_id are mandatory fields.

Response Parameter

Parameter

Type

Mandatory

Description

floatingip

Dict

Yes

Specifies the floating IP address. For details, see Table 1.

Request Example 1

PUT /v2.0/floatingips/b639c937-4737-4107-8978-fecc7327a5ae
{
    "floatingip": {
        "port_id": "21b5c483-84e9-40a1-86b3-3041606106f5",
        "fixed_ip_address": "10.0.2.2"
    }
}

Response Example 1

{
    "floatingip": {
        "router_id": "76c052d6-6a92-444c-b67d-147ee166a480", 
"status": "ACTIVE",
        "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
"floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975",
        "fixed_ip_address": "10.0.2.2",
        "floating_ip_address": "192.150.73.19",
        "port_id": "21b5c483-84e9-40a1-86b3-3041606106f5",
        "id": "b639c937-4737-4107-8978-fecc7327a5ae"
    }
}

Request Example 2

PUT /v2.0/floatingips/3870858f-91dc-489f-92a1-c04dbdc6d781
{
    "floatingip": {
        "port_id": null
    }
}

Response Example 2

{
    "floatingip": {
        "floating_network_id": "809fdbbc-2e3e-426e-897c-cb632b081a72",
        "router_id": null,
        "fixed_ip_address": null,
        "floating_ip_address": "192.168.0.3",
        "tenant_id": "3c8c36e1520147ccbc83d2ccfbb9ab24",
        "status": "ACTIVE",
        "port_id": null,
        "id": "3870858f-91dc-489f-92a1-c04dbdc6d781"
    }
}

Error Code

See section Return Code Processing.