# DescribeEipAddresses

## 1. API Description

This API (DescribeEipAddresses) is used to query the list of elastic IPs. You can query information on elastic IPs according to ID or IP of the elastic IP, and the pricing model.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name  | Required | Type                                                                 | Description                                                                                                                  |
| --------------- | -------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| eipIds          | No       | Array of String                                                      | <p>ID list of elastic IPs.</p><p>The maximum number of elastic IPs in each request is 100.</p>                               |
| eipChargeType   | No       | [ChargeType](/api-reference/compute/bmc/datastructure.md#chargetype) | <p>Elastic IP pricing model .</p><p>PREPAID: subscription</p><p>POSTPAID: pay-as-you-go</p>                                  |
| ipAddress       | No       | String                                                               | IP address.                                                                                                                  |
| zoneId          | No       | String                                                               | Zone ID to which the elastic IPs belong.                                                                                     |
| resourceGroupId | No       | String                                                               | <p>Resource group ID.</p><p>If this parameter is not passed in, all the elastic IPs in authorized resource group return.</p> |
| eipStatus       | No       | [EipStatus](/api-reference/compute/bmc/datastructure.md#eipstatus)   | [Status of elastic IPs](/api-reference/compute/bmc/datastructure.md#eipstatus).                                              |
| instanceId      | No       | String                                                               | Instance ID.                                                                                                                 |
| instanceName    | No       | String                                                               | Instance name.                                                                                                               |
| 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>                                                                      |
| tagKeys         | No       | Array of String                                                      | <p>Query according to tag key.</p><p>You can query up to 20 tag keys in each request.</p>                                    |
| tags            | No       | Array of [Tag](/api-reference/compute/bmc/datastructure.md#tag)      | <p>Query according to tag.</p><p>You can query up to 20 tags in each request.</p>                                            |

## 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                                                                       | The total number of elastic IPs.                                                                                      |
| dataSet        | Array of [EipAddress](/api-reference/compute/bmc/datastructure.md#eipaddress) | List of elastic IPs.                                                                                                  |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the list of elastic IPs according to** `eipChargeType`

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

Request：
{
    "eipChargeType": "PREPAID"
}

Response：
{   
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
     "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E"，
     "dataSet": [
         {
            "eipId": "eipId1",
            "zoneId": "SEL-A",
            "ipAddress": "x.x.x.x",
            "instanceId": "instanceId1",
            "instanceName": "instanceName",
            "eipChargeType": "PREPAID",
            "period": 1,
            "createTime": "2022-09-25T16:53:38Z",
            "expiredTime": "2022-10-25T16:53:38Z",
            "eipStatus": "AVAILABLE",
            "resourceGroupId": "xx",
            "resourceGroupName": "xx"
         }
     ],
     totalCount: 1
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，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](/api-reference/api-introduction/instruction/commonerrorcode.md).

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


---

# 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/compute/bmc/elastic-ip/describeeipaddresses.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.
