Help Center > Virtual Private Cloud > API Reference > Elastic IP Address > Querying Elastic IP Addresses

Querying Elastic IP Addresses

Function

This interface is used to query elastic IP addresses using search criteria and to display the elastic IP addresses in a list.

URI

  • GET /v1/{tenant_id}/publicips
  • Example:
    /v1/{tenant_id}/publicips?limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d
  • Parameter description

    Name

    Mandatory

    Type

    Description

    tenant_id

    Yes

    String

    Specifies the tenant ID of the operator.

    marker

    No

    String

    Specifies the resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried.

    limit

    No

    int

    Specifies the number of records returned on each page. The value ranges from 0 to intmax.

Request

  • Parameter description

    None

  • Example request

    None

Response

  • Parameter description

    Name

    Mandatory

    Type

    Description

    publicips

    Yes

    List data structure

    Specifies the elastic IP address list objects.

    Descriptions of publicips fields

    Name

    Mandatory

    Type

    Description

    id

    Yes

    String

    Specifies the ID of the elastic IP address, which uniquely identifies the elastic IP address.

    status

    Yes

    String

    Specifies the status of the elastic IP address.

    The value can be FREEZEDBIND_ERRORBINDINGPENDING_DELETEPENDING_CREATENOTIFYINGNOTIFY_DELETEPENDING_UPDATEDOWNACTIVEELBERROR, or UNKNOWN.

    type

    Yes

    String

    Specifies the type of the elastic IP address.

    public_ip_address

    Yes

    String

    Specifies the obtained elastic IP address.

    private_ip_address

    No

    String

    Specifies the private IP address bound to the elastic IP address.

    The parameter is returned only when the private IP address is bound to the elastic IP address.

    port_id

    No

    String

    Specifies the port ID.

    The parameter is returned only when the private IP address is bound to the elastic IP address.

    tenant_id

    Yes

    String

    Specifies the tenant ID of the operator.

    create_time

    Yes

    String

    Specifies the time for applying for the elastic IP address.

    bandwidth_id

    Yes

    String

    Specifies the bandwidth ID of the elastic IP address.

    bandwidth _size

    Yes

    int

    Specifies the bandwidth size.

    bandwidth_share_type

    Yes

    String

    Specifies whether the bandwidth is shared or exclusive.

    bandwidth_name

    Yes

    String

    Specifies the bandwidth name.

  • Example response
    {
        "publicips": [
            {
                "id": "6285e7be-fd9f-497c-bc2d-dd0bdea6efe0",
                "status": "DOWN",
                "type": "5_bgp",
                "public_ip_address": "161.17.101.9",
                "private_ip_address": "192.168.10.5",
                "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c",
                "create_time": "2015-07-16 04:22:32",
                "bandwidth_id": "3fa5b383-5a73-4dcb-a314-c6128546d855",
                "bandwidth_share_type": "PER",
                "bandwidth_size": 5,
                "bandwidth_name": "bandwidth-test"
            },
            {
                "id": "80d5b82e-43b9-4f82-809a-37bec5793bd4",
                "status": "DOWN",
                "type": "5_bgp",
                "public_ip_address": "161.17.101.10",
                "private_ip_address": "192.168.10.6",
                "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c",
                "create_time": "2015-07-16 04:23:03",
                "bandwidth_id": "a79fd11a-047b-4f5b-8f12-99c178cc780a",
                "bandwidth_share_type": "PER",
                "bandwidth_size": 5,
                "bandwidth_name": "bandwidth-test1"
    
            }
        ]
    }

Returned Value

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The server failed to process the request.

    401 Unauthorized

    You must enter the username and password to access the requested page.

    403 Forbidden

    You are forbidden to access the requested page.

    404 Not Found

    The server could not find the requested page.

    405 Method Not Allowed

    You are not allowed to use the method specified in the request.

    406 Not Acceptable

    The response generated by the server could not be accepted by the client.

    407 Proxy Authentication Required

    You must use the proxy server for authentication so that the request can be processed.

    408 Request Timeout

    The request timed out.

    409 Conflict

    The request could not be processed due to a conflict.

    500 Internal Server Error

    Failed to complete the request because of an internal service error.

    501 Not Implemented

    Failed to complete the request because the server does not support the requested function.

    502 Bad Gateway

    Failed to complete the request because the request is invalid.

    503 Service Unavailable

    Failed to complete the request because the service is unavailable.

    504 Gateway Timeout

    A gateway timeout error occurred.

Registration