# DescribeEips

## 1. 接口描述

本接口(DescribeEips)用于指定条件查询已创建的弹性IPv4的信息。用户可以根据ID、名称等信息来搜索。

## 2. 请求参数

以下请求参数列表仅列出了接口中需要的请求参数

| 参数名称               | 必选 | 类型                                                                                      | 描述                                                      |
| ------------------ | -- | --------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| eipIds             | 否  | Array of String                                                                         | 按照 EIP 的唯一 ID 过滤。                                       |
| regionId           | 否  | String                                                                                  | 按照 EIP 所属节点ID过滤。                                        |
| name               | 否  | String                                                                                  | 按照 EIP 的显示名称过滤，该字段支持模糊匹配。                               |
| status             | 否  | [EipStatus](/api-reference/cn/compute/zec/datastructure.md#eipstatus)                   | 按照 EIP 的状态过滤。                                           |
| isDefault          | 否  | Boolean                                                                                 | 按照 EIP 的默认属性进行过滤。                                       |
| pageSize           | 否  | Integer                                                                                 | <p>返回的分页大小。</p><p>默认为20，最大为1000。</p>                    |
| pageNum            | 否  | Integer                                                                                 | <p>返回的分页页码。</p><p>默认值：1</p>                             |
| privateIpAddress   | 否  | String                                                                                  | 按照 EIP 绑定的内网 IP 过滤。                                     |
| ipAddress          | 否  | String                                                                                  | 按照 IP地址过滤。                                              |
| ipAddresses        | 否  | Array of String                                                                         | 按照 EIP 的 IP列表过滤。                                        |
| instanceId         | 否  | String                                                                                  | <p>按照 EIP 绑定的实例 ID 过滤。</p><p>该字段过滤出该实例所绑定的网卡上的 EIP。</p> |
| associatedId       | 否  | String                                                                                  | 按照 EIP 绑定的资源 ID 过滤。                                     |
| cidrIds            | 否  | Array of String                                                                         | 按照 EIP 所属的CIDR ID列表 过滤。                                 |
| resourceGroupId    | 否  | String                                                                                  | 按照 EIP 所属的资源组ID过滤。                                      |
| tagKeys            | 否  | Array of String                                                                         | <p>根据标签键进行搜索。</p><p>最长不得超过20个标签键。</p>                   |
| tags               | 否  | Array of [Tag](/api-reference/cn/compute/zec/datastructure.md#tag)                      | <p>根据标签进行搜索。</p><p>最长不得超过20个标签。</p>                     |
| internetChargeType | 否  | [InternetChargeType](/api-reference/cn/compute/zec/datastructure.md#internetchargetype) | 按照 EIP 的网络计费方式过滤。                                       |

## 3. 响应结果

| 参数名称       | 类型                                                                         | 描述                                                       |
| ---------- | -------------------------------------------------------------------------- | -------------------------------------------------------- |
| requestId  | String                                                                     | <p>唯一请求 ID。</p><p>每次请求都会返回。定位问题时需要提供该次请求的 requestId。</p> |
| totalCount | Integer                                                                    | 满足过滤条件的EIP总数。                                            |
| dataSet    | Array of [EipInfo](/api-reference/cn/compute/zec/datastructure.md#eipinfo) | 返回的EIP列表。                                                |

## 4. 代码示例

{% tabs %}
{% tab title="示例" %}
**1. 1. 根据公网IP查询匹配的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": "<eipId>",
        "regionId": "na-east-1",
        "privateIpAddress": "10.0.0.1",
        "publicIpAddresses": [
          "128.0.0.1"
        ],
        "internetChargeType": "ByBandwidth",
        "bandwidth": 10000,
        "rateLimitMode": "LOOSE",
        "cidrId": "<cidrId>",
        "isDefault": true,
        "eipV4Type": "BGPLine",
        "networkLineType": "PremiumBGP",
        "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": "<nicId>",
        "instanceId": "<instanceId>",
        "associatedId": "<nicId>",
        "associatedType": "NIC",
        "instanceName": "<instanceName>",
        "resourceGroupId": "<resourceGroupId>",
        "resourceGroupName": "<resourceGroupName>",
        "bandwidthCluster": null,
        "eipGeoRefs": [
          {
            "ip": "128.0.0.1",
            "dbIp": "United States of America",
            "ipData": "United States of America",
            "ipInfo": "United States of America",
            "maxMind": "United States of America",
            "standard": "United States of America",
            "ipGeoLocation": "United States of America",
            "isConsistent": true
          }
        ],
        "blockInfoList": [
          {
            "ip": "128.0.0.1",
            "bps": 100,
            "pps": 200,
            "inCps": 300,
            "outCps": 400
          }
        ]
      },
        "tags":null
    ],
    "totalCount": 1
  }
}
```

{% endtab %}
{% endtabs %}

## 5. 开发者工具

Zenlayer Cloud API 2.0 提供了配套的[开发工具集（SDK）](/api-reference/cn/api-introduction/toolkit.md)，未来会陆续支持更多开发语言，方便快速接入和使用Zenlayer的产品和服务。

## 6. 错误码

下面包含业务逻辑中遇到的错误码，其他错误码见[公共错误码](/api-reference/cn/api-introduction/instruction/commonerrorcode.md)

| HTTP状态码 | 错误码 | 说明 |
| ------- | --- | -- |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/api-reference/cn/compute/zec/elastic-ip/describeeips.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
