# DescribeEips

## 1. API Description

This API (DescribeEips) is used to query the information of one or more specified elastic IPs. You can search for elastic IP information based on elastic IP ID, elastic IP name, etc.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name     | Required | Type                                                                                                           | Description                                                                                                                  |
| ------------------ | -------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| eipIds             | No       | Array of String                                                                                                | Elastic IP ID(s).                                                                                                            |
| regionId           | No       | String                                                                                                         | Region ID                                                                                                                    |
| name               | No       | String                                                                                                         | <p>Elastic IP name.</p><p>Fuzzy search supported.</p>                                                                        |
| status             | No       | [EipStatus](https://docs.console.zenlayer.com/api-reference/compute/datastructure#eipstatus)                   | Status of the elastic IP.                                                                                                    |
| isDefault          | No       | Boolean                                                                                                        | Whether the elastic IP is the default public IP.                                                                             |
| pageSize           | No       | Integer                                                                                                        | <p>Number of items in the current page result.</p><p>Default value: 20;</p><p>Maximum value: 1000.</p>                       |
| pageNum            | No       | Integer                                                                                                        | <p>Number of pages returned.</p><p>Default value: 1.</p><p>Default value: 1</p>                                              |
| privateIpAddress   | No       | String                                                                                                         | Filter by private IP bound to the elastic IP.                                                                                |
| ipAddress          | No       | String                                                                                                         | Filter by elastic IP address.                                                                                                |
| ipAddresses        | No       | Array of String                                                                                                | Filter by elastic IP addresses.                                                                                              |
| instanceId         | No       | String                                                                                                         | <p>Filter by instance ID bound to the elastic IP.</p><p>This field filters the elastic IPs bound to the instance's vNIC.</p> |
| associatedId       | No       | String                                                                                                         | Filter by resource ID bound to the elastic IP.                                                                               |
| cidrIds            | No       | Array of String                                                                                                | Filter by CIDR IDs to which the EIP belongs.                                                                                 |
| resourceGroupId    | No       | String                                                                                                         | Resource Group ID.                                                                                                           |
| tagKeys            | No       | Array of String                                                                                                | <p>Query using tag keys.</p><p>A maximum of 20 tag keys can be used.</p>                                                     |
| tags               | No       | Array of [Tag](https://docs.console.zenlayer.com/api-reference/compute/datastructure#tag)                      | <p>Query using tags.</p><p>A maximum of 20 tags can be used.</p>                                                             |
| internetChargeType | No       | [InternetChargeType](https://docs.console.zenlayer.com/api-reference/compute/datastructure#internetchargetype) | Filter by the network billing model of the elastic IP.                                                                       |

## 3. Output Parameters

| Parameter Name | Type                                                                                              | Description                                                                                                           |
| -------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                                            | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| totalCount     | Integer                                                                                           | Number of elastic IPs meeting the filtering conditions.                                                               |
| dataSet        | Array of [EipInfo](https://docs.console.zenlayer.com/api-reference/compute/datastructure#eipinfo) | List of elastic IPs.                                                                                                  |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the list of IPs based on public IP.**

```json
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeEips
<Common Request Params>

Request：
{
  "ipAddress": "128.0.0.1"
}


Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E",
    "dataSet": [
      {
        "eipId": "<eip id>",
        "regionId": "na-east-1",
        "privateIpAddress": "10.0.0.1",
        "publicIpAddresses": [
          "128.0.0.1"
        ],
        "internetChargeType": "ByBandwidth",
        "bandwidth": 1000,
        "cidrId": "<cidr id>",
        "isDefault": true,
        "eipV4Type": "ChinaUnicom",
        "createTime": "2022-09-25T16:53:38Z",
        "expiredTime": "2022-10-25T16:53:38Z",
        "name": "EIP-na-east-1-1",
        "status": "BINDED",
        "bindType": "FullNat",
        "flowPackage": null,
        "peerRegionId": null,
        "nicId": "<nic id>",
        "instanceId": "<instance id>",
        "associatedId": "<nic id>",
        "associatedType": "NIC",
        "instanceName": "instanceName",
        "resourceGroupId": "xx",
        "resourceGroupName": "xx",
        "bandwidthCluster": null,
        "eipGeoRefs": [
          {
            "ip": "128.0.0.1",
            "dbIp": "华盛顿",
            "ipData": "华盛顿",
            "ipInfo": "华盛顿",
            "maxMind": "华盛顿",
            "standard": "华盛顿",
            "isConsistent": true
          }
        ],
        "blockInfoList": [
          {
            "ip": "128.0.0.1",
            "bps": 100,
            "pps": 200,
            "inCps": 300,
            "outCps": 400
          }
        ]
      },
        "tags":null
    ],
    "totalCount": 1
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/api-reference/api-introduction/toolkit/api-sdk)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/commonerrorcode).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
