• Elastic IP

eip
  1. Help Center
  2. Elastic IP
  3. API Reference
  4. APIs
  5. Elastic IP Address
  6. Updating an EIP

Updating an EIP

Function

This interface is used to update an EIP, for example, binding an EIP to a NIC, unbinding an EIP from a NIC, or converting the IP address version.

URI

PUT /v1/{project_id}/publicips/{publicip_id}
Table 1 Parameter description

Name

Mandatory

Description

project_id

Yes

Specifies the project ID.

publicip_id

Yes

Specifies the unique identifier of the EIP.

Request Message

  • Request parameter
    Table 2 Request parameter

    Name

    Mandatory

    Type

    Description

    publicip

    Yes

    Dictionary data structure

    Specifies the EIP object.

    Table 3 Description of the publicip field

    Name

    Mandatory

    Type

    Description

    port_id

    No

    String

    • Specifies the port ID.
    • The value must be an existing port ID. If this parameter is not included or the parameter value is left blank, the EIP is unbound. If the specified port ID does not exist or has already been bound with an EIP, an error message will be displayed.
  • Example request 1
    {
        "publicip": {
            "port_id": "f588ccfa-8750-4d7c-bf5d-2ede24414706"
        }
    }

Response Message

  • Response parameter
    Table 4 Response parameter

    Name

    Type

    Description

    publicip

    Dictionary data structure

    Specifies the EIP object.

    Table 5 Description of the publicip field

    Name

    Type

    Description

    id

    String

    Specifies the unique identifier of the EIP.

    status

    String

    • Possible values are as follows:
      • FREEZED (Frozen)
      • BIND_ERROR (Binding failed)
      • BINDING (Binding)
      • PENDING_DELETE (Releasing)
      • PENDING_CREATE (Assigning)
      • NOTIFYING (Assigning)
      • NOTIFY_DELETE (Releasing)
      • PENDING_UPDATE (Updating)
      • DOWN (Unbound)
      • ACTIVE (Bound)
      • ELB (Bound to a load balancer)
      • ERROR (Failed)
    • Specifies the EIP status.

    type

    String

    Specifies the EIP type.

    public_ip_address

    String

    Specifies the obtained EIP if only IPv4 EIPs are available.

    port_id

    String

    Specifies the port ID.

    tenant_id

    String

    Specifies the project ID.

    create_time

    String

    Specifies the time (UTC time) when the EIP was assigned.

    bandwidth_size

    int

    Specifies the bandwidth size.

  • Example response 1
    {
        "publicip": {
            "id": "f588ccfa-8750-4d7c-bf5d-2ede24414706",
            "status": "PENDING_UPDATE",
            "type": "5_bgp",
            "public_ip_address": "161.xx.xx.7",
            "port_id": "f588ccfa-8750-4d7c-bf5d-2ede24414706",
            "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c",
            "create_time": "2015-07-16 04:10:52",
            "bandwidth_size": 6
            
        }
    }

Status Codes

For details, see section Status Codes.

Error Codes

For details, see section Error Codes.