• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. APIs
  5. Elastic IP Address
  6. Querying an EIP

Querying an EIP

Function

This interface is used to query an EIP.

URI

GET /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

    None

  • Example request

    None

Response Message

  • Response parameter
    Table 2 Response parameter

    Name

    Type

    Description

    publicip

    Dictionary data structure

    Specifies the EIP object.

    Table 3 Description of the publicip field

    Name

    Type

    Description

    id

    String

    Specifies the unique identifier of the EIP.

    status

    String

    • Specifies the EIP status.
    • 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)

    type

    String

    Specifies the EIP type.

    public_ip_address

    String

    Specifies the obtained EIP if only IPv4 EIPs are available.

    private_ip_address

    String

    • Specifies the private IP address bound with the EIP.
    • This parameter is returned only when a private IP address is bound with the EIP.

    port_id

    String

    • Specifies the port ID.
    • This parameter is returned only when a private IP address is bound with the EIP.

    tenant_id

    String

    Specifies the project ID.

    create_time

    String

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

    bandwidth_id

    String

    Specifies the ID of the bandwidth associated with the EIP.

    bandwidth_size

    int

    Specifies the bandwidth size.

    bandwidth_share_type

    String

    Specifies the dedicated bandwidth.

  • Example response
    {
        "publicip": {
            "id": "2ec9b78d-9368-46f3-8f29-d1a95622a568",
            "status": "DOWN",
            "type": "5_bgp",
            "public_ip_address": "161.xx.xx.12",
            "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c",
            "private_ip_address": "192.168.10.5",
            "create_time": "2015-07-16 04:32:50",
            "bandwidth_id": "49c8825b-bed9-46ff-9416-704b96d876a2",
            "bandwidth_share_type": "PER",
            "bandwidth_size": 10
           
            
        }
    }

Status Codes

For details, see section Status Codes.

Error Codes

For details, see section Error Codes.