• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. APIs
  5. Floating IP Address (IPv6)
  6. Creating a Floating IP Address

Creating a Floating IP Address

Function

This interface 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 creating 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

  • Request parameter
Table 1 Request parameter

Parameter

Type

Mandatory

Description

floatingip

Dict

Yes

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

Mandatory field: floating_network_id

  • Example request
POST /v2.0/eip/floatingips_v6
{
    "floatingip": {
        "floating_network_id": "5ce655fa-c911-4d2c-99f7-445bc1162ef8",
        "port_id": "552389f5-8f4c-4bb7-9991-07233c315d60"
    }
}

Response Message

  • Response parameter
    Table 2 Response parameter

    Parameter

    Type

    Description

    floatingip

    Dict

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

  • Example response
    {
        "floatingip": {
            "router_id": "76c052d6-6a92-444c-b67d-147ee166a480",
            "status": "DOWN",
            "tenant_id": "6fd9b5fdb997425f97bc5ba1f0846084",
            "floating_network_id": "5ce655fa-c911-4d2c-99f7-445bc1162ef8",
            "fixed_ip_address": "12.xx.xx.5",
            "floating_ip_address": "cdcd:910a:2222:5498:8475:1111:c013:8096",
            "port_id": "552389f5-8f4c-4bb7-9991-07233c315d60",
            "id": "2567f393-5c76-42db-a397-477723ce41f7"
        }
    }

Status Codes

For details, see section Status Codes.

Error Codes

For details, see section Error Codes.