Assigning a Floating IP Address

Function

This API is used to assign a floating IP address and associates it with an internal port.

Restrictions

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 assigning a floating IP address.

The port_id parameter value must be the ECS port ID, which can be obtained from the NIC ID parameter in the ECS NIC details.

URI

POST /v2.0/eip/floatingips_v6

Request Message

Table 1 Request parameter

Parameter

Type

Mandatory

Description

floatingip

floatingip object

Yes

Specifies the floating IP address list. For details, see Table 2.

Table 2 floatingip objects

Parameter

Mandatory

Type

Description

id

Yes

String

Specifies the floating IP address ID.

floating_ip_address

No

String

Specifies the floating IPv6 address.

floating_network_id

No

String

Specifies the external network ID.

You can only use fixed external network.

You can use GET /v2.0/networks?router:external=True or

GET /v2.0/networks?name={floating_network} or run the neutron net-external-list command to obtain information about the external network.

router_id

No

String

Specifies the ID of the belonged router.

port_id

No

String

Specifies the port ID.

fixed_ip_address

No

String

Specifies the private IP address of the associated port.

This value can only be dynamically assigned by the system.

tenant_id

No

String

Specifies the project ID.

POST https://{Endpoint}/v2.0/eip/floatingips_v6

{
    "floatingip": {
        "floating_network_id": "5ce655fa-c911-4d2c-99f7-445bc1162ef8",
        "port_id": "552389f5-8f4c-4bb7-9991-07233c315d60"
    }
}

Response Message

Status Code

See Status Codes.

Error Code

See Error Codes.