# Obtain Elastic IP Information - DescribeEIP

## Overview

Obtain Elastic IP Information






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `DescribeEIP`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.genesissai.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region |**Yes**|
| **ProjectId** | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. |No|
| **EIPIds.N** | string | If the resource ID of the Elastic IP is empty, return all EIPs in the current Region that meet the conditions. |No|
| **Offset** | int | Data offset, default is 0 |No|
| **Limit** | int | Data pagination value, default is 20 |No|
| **IPs.N** | string | IP address, supports query by IP. If both IP and EIP are passed, the query will take the union set. |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **TotalCount** | int | Total number of eligible Elastic IPs |No|
| **UnbindCount** | int | Total number of unbound Elastic IPs |No|
| **TotalBandwidth** | int | Total bandwidth of eligible Elastic IPs, unit in Mbps |No|
| **EIPSet** | array[[*UnetEIPSet*](#uneteipset)] | Elastic IP List, see UnetEIPSet for each parameter details. |No|

#### Data Model


#### UnetEIPSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **EIPId** | string | Elastic IP Resource ID |No|
| **Weight** | int | Egress weight of the public network, default is 50, range [0-100] |No|
| **BandwidthType** | int | Bandwidth Mode, enumeration values are: 0: Non-shared bandwidth mode, 1: Shared bandwidth mode |No|
| **Bandwidth** | int | The bandwidth of the Elastic IP, measured in Mbps. When BandwidthType=1, this shows the shared bandwidth value. When BandwidthType=0, this shows the bandwidth of this Elastic IP. |No|
| **Status** | string | The resource binding status of Elastic IP, enumeration values are: used: Bound, free: Unbound, freeze: Frozen. |No|
| **ChargeType** | string | Payment method, enumeration values are: Year, pay annually; Month, pay monthly; Dynamic, pay hourly; Trial, trial. The two payment modes of hourly payment and trial need to be authorized. |No|
| **CreateTime** | int | Creation time of Elastic IP, in Unix Timestamp format |No|
| **ExpireTime** | int | Expiration time of Elastic IP, formatted as Unix Timestamp |No|
| **Resource** | [*UnetEIPResourceSet*](#uneteipresourceset) | Detailed information list of Elastic IP, see the specific structure below UnetEIPResourceSet |No|
| **EIPAddr** | array[[*UnetEIPAddrSet*](#uneteipaddrset)] | Detailed information list of Elastic IP, see UnetEIPAddrSet structure below for specifics. |No|
| **Name** | string | The name of the Elastic IP, the default value is 'EIP'. |No|
| **Tag** | string | Business group identifier for Elastic IP, default value is "Default". |No|
| **Remark** | string | Remarks for Elastic IP, the default value is "". |No|
| **PayMode** | string | The billing mode of Elastic IP, enumeration values are: "Bandwidth", bandwidth billing; "Traffic", traffic billing; "ShareBandwidth", shared bandwidth mode. The default is "Bandwidth"."""<br /> |No|
| **ShareBandwidthSet** | [*ShareBandwidthSet*](#sharebandwidthset) | Shared Bandwidth Information See ShareBandwidthSet |No|
| **Expire** | boolean | Is the Elastic IP expired? |No|
| **EIPBinding** | [*EIPBinding*](#eipbinding) | EIP Binding Intranet IP Relationship Data |No|

#### UnetEIPResourceSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ResourceType** | string | Bound resource types, enumeration values are: uhost, UHost; natgw: NAT Gateway; ulb: Load Balancer; upm: Physical Machine; hadoophost: Big Data Cluster; fortresshost: Bastion Host; udockhost: Container; udhost: Private Zone Host; vpngw: IPSec VPN; ucdr: Cloud Disaster Recovery; dbaudit: Database Audit, uni: Virtual Network Interface. |No|
| **ResourceName** | string | Bound Resource Name |No|
| **ResourceID** | string | Resource ID of the bound resource |No|
| **SubResourceType** | string | The type of the virtual network card bound to the resource. uni, virtual network card. |No|
| **SubResourceName** | string | The name of the virtual network card bound to the resource |No|
| **SubResourceId** | string | ID of the virtual network card bound to the resource |No|
| **EIPId** | string | Elastic IP Resource ID |No|

#### UnetEIPAddrSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **OperatorName** | string | Operator information such as: International: International, BGP: BGP |No|
| **IP** | string | IP Address |No|

#### ShareBandwidthSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ShareBandwidth** | int | Shared Bandwidth Value |No|
| **ShareBandwidthName** | string | Shared Bandwidth Resource Name |No|
| **ShareBandwidthId** | string | Shared Bandwidth ID |No|

#### EIPBinding

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **EIP** | string | Public IP |No|
| **PrivateIP** | string | Intranet IP |No|
| **PrivateIPType** | string | Intranet IP type: PrimaryIP (default), SecondaryIP (non-default) |No|

## Example

### Request Example
    
```
https://api.genesissai.com/?Action=DescribeEIP
&Region=cn-bj2
&EIPIds.0=eip-XXXX
&IPs.n=XXHDIxmf
```

### Response Example
    
```json
{
  "Action": "DescribeEIPResponse",
  "EIPBinding": [
    {
      "EIP": "CcSrYinL",
      "PrivateIP": "knTpCYwB",
      "PrivateIPType": "cUMLjFZU"
    }
  ],
  "EIPSet": [
    {
      "Bandwidth": 20,
      "BandwidthType": 1,
      "ChargeType": "Month",
      "CreateTime": 1528785841,
      "EIPAddr": [
        {
          "IP": "106.75.XX.XX",
          "OperatorName": "BGP"
        }
      ],
      "EIPId": "eip-XXXXX",
      "Expire": false,
      "ExpireTime": 1530374400,
      "Name": "EIP",
      "PayMode": "ShareBandwidth",
      "Remark": "",
      "Resource": {
        "ResourceID": "uhost-XXXXXX",
        "ResourceName": "test",
        "ResourceType": "uhost",
        "Zone": "cn-sh2-01"
      },
      "ShareBandwidthSet": {
        "ShareBandwidth": 20,
        "ShareBandwidthId": "bwshare-XXXX",
        "ShareBandwidthName": "test"
      },
      "Status": "used",
      "Tag": "Default",
      "Weight": 50
    }
  ],
  "Request_uuid": "f33cf273-89ed-4215-a9c6-XXXXXXX",
  "RetCode": 0,
  "TotalBandwidth": 13,
  "TotalCount": 10,
  "UnbindCount": 5
}
```





