• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Floating IP Address Management
  6. Assigning a Floating IP Address (Discarded)

Assigning a Floating IP Address (Discarded)

Function

This API is used to assign a floating IP address.

Constraints

  • Users need to obtain a network resource pool that provides floating IP addresses. You can run GET /v2.0/networks?router:external=True or neutron net-external-list to obtain a network resource pool.
  • This API will be discarded. You are advised to use the VPC API "Assigning a Floating IP Address".

URI

POST /v2.1/{project_id}/os-floating-ips

Table 1 describes the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

Request

Request parameters

Table 2 describes the request parameters.

Table 2 Request parameters

Parameter

Type

Mandatory

Description

tenant_id

String

Yes

Specifies the tenant ID specified in the URI.

The value is in UUID format.

pool

String

No

Specifies the network resource pool that provides floating IP addresses. If it is not specified, the default resource pool is used.

Response

Response parameters

Table 3 describes the response parameters.

Table 3 Response parameters

Parameter

Type

Mandatory

Description

floating_ip

Dict

Yes

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

Table 4 floating_ip objects

Parameter

Type

Mandatory

Description

fixed_ip

String

Yes

Specifies a private IP address.

id

String

Yes

Specifies the floating IP address ID in UUID format.

instance_id

String

Yes

Specifies the ID of a bound ECS in UUID format.

ip

String

Yes

Specifies the floating IP address.

pool

String

Yes

Specifies the name of a network resource pool that provides floating IP addresses.

Examples

  • Example request
    POST /v2/e73621affb8f44e1bc01898747ca09d4/os-floating-ips
    POST /v2.1/e73621affb8f44e1bc01898747ca09d4/os-floating-ips
    {
    "pool": "external"
    }
  • Example response
    {
      "floating_ip": {
        "id": "7aa2aa63-3097-4cfe-a2e4-596c301d3b1b",
        "pool": "external",
        "ip": "10.154.53.184",
        "fixed_ip": null,
        "instance_id": null
      }
    }

Returned Values

See General Request Returned Values.