接口功能介绍
调用此接口可查询指定地域已创建的弹性公网IP(Elastic IP Address,简称EIP)。
接口约束
无。
URI
POST /v4/eip/list
请求参数
请求Body参数
参数 | 参数类型 | 是否必填 | 说明 | 示例 |
---|---|---|---|---|
clientToken | String | 是 | 客户端存根,用于保证订单幂等性, 长度 1 - 64 | 79fa97e3-c48b-xxxx-9f46-6a13d8163678 |
regionID | String | 是 | 资源池 ID | |
projectID | String | 否 | 企业项目 ID,默认为"0" | |
page | Integer | 否 | 分页参数 | |
pageNo | Integer | 否 | 列表的页码,默认值为 1, 推荐使用该字段, page 后续会废弃 | 1 |
pageSize | Integer | 否 | 每页数据量大小,取值 0-50 | |
ids | Array of Strings | 否 | 是 Array 类型,里面的内容是 String | |
status | string | 否 | eip状态 ACTIVE(已绑定)/ DOWN(未绑定)/ FREEZING(已冻结)/ EXPIRED(已过期),不传是查询所有状态的 EIP | |
ipType | string | 否 | ip类型 ipv4 / ipv6 | |
eipType | string | 否 | eip类型 normal / cn2 |
响应参数
参数 | 参数类型 | 说明 | 示例 |
---|---|---|---|
statusCode | Integer | 返回状态码(800为成功,900为失败) | 800 |
message | String | statusCode为900时的错误信息; statusCode为800时为success, 英文 | success |
description | String | statusCode为900时的错误信息; statusCode为800时为成功, 中文 | 成功 |
errorCode | String | statusCode为900时为业务细分错误码,三段式:product.module.code; statusCode为800时为SUCCESS | SUCCESS |
returnObj | Object | object | 返回结果 |
totalCount | Integer | 列表条目数 | 20 |
currentCount | Integer | 分页查询时每页的行数。 | 4 |
totalPage | Integer | 总页数 | 5 |
表 returnObj
参数 | 参数类型 | 说明 | 示例 |
---|---|---|---|
eips | Array of Objects | 弹性 IP 列表 | 见下表 |
表 eips
参数 | 参数类型 | 描述 | 说明 |
---|---|---|---|
ID | String | eip ID | |
name | String | eip 名称 | |
description | String | 描述 | |
eipAddress | String | eip 地址 | |
associationID | String | 当前绑定的实例的 ID | |
associationType | String | 当前绑定的实例类型 | |
privateIpAddress | String | 交换机网段内的一个 IP 地址 | |
bandwidth | Integer | 带宽峰值大小,单位 Mb | |
status | String | 1.ACTIVE 2.DOWN 3.ERROR 4.UPDATING 5.BANDING_OR_UNBANGDING 6.DELETING 7.DELETED 8.EXPIRED | |
tags | String | EIP 的标签集合 | |
createdAt | String | 创建时间 | |
updatedAt | String | 更新时间 | |
expiredAt | String | 到期时间 | 2022-11-25T01:08:10Z |
请求示例
POST /v4/eip/list?regionID=xxx&clientToken=xxxx
请求体body
响应示例
{
"statusCode": 800,
"errorCode": "SUCCESS",
"message": "success",
"description": "",
"returnObj": {
"eips": [
{
"ID": "eip-gyl69v26yx",
"name": "turn-test11",
"eipAddress": "100.124.16.204",
"associationID": "natgw-or5g08lk8z",
"associationType": "PORTFORWARDING",
"privateIpAddress": "",
"bandwidth": 100,
"status": "ACTIVE",
"tags": "",
"createdAt": "2022-11-17T11:06:38Z",
"updatedAt": "2022-11-17T11:11:23Z",
"expiredAt": "2022-12-17T11:06:38Z"
},
{
"ID": "eip-ttc46rbdtb",
"name": "turn-test10",
"eipAddress": "100.124.16.191",
"associationID": "natgw-l03gnhsct9",
"associationType": "PORTFORWARDING",
"privateIpAddress": "",
"bandwidth": 0,
"status": "ACTIVE",
"tags": "",
"createdAt": "2022-11-17T10:10:21Z",
"updatedAt": "2022-11-17T10:11:25Z",
"expiredAt": null
},
{
"ID": "eip-zy8vg0kfow",
"name": "turn-test8",
"eipAddress": "100.124.16.200",
"associationID": null,
"associationType": null,
"privateIpAddress": null,
"bandwidth": 0,
"status": "BANGDING_OR_UNBANDING",
"tags": "",
"createdAt": "2022-11-17T10:03:05Z",
"updatedAt": "2022-11-22T03:36:02Z",
"expiredAt": null
},
{
"ID": "eip-8epskb8s6z",
"name": "turn-test7",
"eipAddress": "100.124.16.199",
"associationID": null,
"associationType": null,
"privateIpAddress": null,
"bandwidth": 0,
"status": "BANGDING_OR_UNBANDING",
"tags": "",
"createdAt": "2022-11-17T10:00:31Z",
"updatedAt": "2022-11-22T03:37:54Z",
"expiredAt": null
},
{
"ID": "eip-jvtemnv9ej",
"name": "turn-test6",
"eipAddress": "100.124.16.193",
"associationID": null,
"associationType": null,
"privateIpAddress": null,
"bandwidth": 0,
"status": "BANGDING_OR_UNBANDING",
"tags": "",
"createdAt": "2022-11-17T09:57:55Z",
"updatedAt": "2022-11-22T02:53:16Z",
"expiredAt": null
},
{
"ID": "eip-rymcu5n283",
"name": "turn-test5",
"eipAddress": "100.124.16.72",
"associationID": "",
"associationType": null,
"privateIpAddress": "",
"bandwidth": 100,
"status": "BANGDING_OR_UNBANDING",
"tags": "",
"createdAt": "2022-11-17T09:49:34Z",
"updatedAt": "2022-11-22T03:07:49Z",
"expiredAt": "2122-11-17T09:49:34Z"
},
{
"ID": "eip-z03o5an2o9",
"name": "turn-test4",
"eipAddress": "100.124.16.197",
"associationID": "",
"associationType": null,
"privateIpAddress": "",
"bandwidth": 100,
"status": "DOWN",
"tags": "",
"createdAt": "2022-11-17T09:41:43Z",
"updatedAt": "2022-11-17T09:46:54Z",
"expiredAt": "2023-05-17T09:41:43Z"
},
{
"ID": "ipv6-n19eucosil",
"name": "",
"eipAddress": "100:1:1a4:f400:ba0f:5e72:339d:965f",
"associationID": "6d3867dd-5884-1e08-01e8-f4a7cc711f04",
"associationType": "INSTANCE",
"privateIpAddress": "100:1:1a4:f400:ba0f:5e72:339d:965f",
"bandwidth": 0,
"status": "DOWN",
"tags": "",
"createdAt": "2022-11-17T09:36:14Z",
"updatedAt": "2022-11-17T09:36:14Z",
"expiredAt": null
},
{
"ID": "eip-3k14yhjcsa",
"name": "turn-test3",
"eipAddress": "100.124.16.71",
"associationID": "",
"associationType": "",
"privateIpAddress": "",
"bandwidth": 100,
"status": "DOWN",
"tags": "",
"createdAt": "2022-11-17T08:04:07Z",
"updatedAt": "2022-11-17T08:08:48Z",
"expiredAt": "2023-05-17T08:04:07Z"
},
{
"ID": "eip-jodpct3k9h",
"name": "turn-test2",
"eipAddress": "100.124.16.174",
"associationID": "",
"associationType": null,
"privateIpAddress": "",
"bandwidth": 100,
"status": "DOWN",
"tags": "",
"createdAt": "2022-11-17T08:02:07Z",
"updatedAt": "2022-11-17T08:08:55Z",
"expiredAt": "2022-12-17T08:02:07Z"
}
]
},
"currentCount": 10,
"totalCount": 75,
"totalPage": 8
}
状态码
状态码 | 描述 |
---|---|
200 | 表示请求成功。 |
错误码
请参考 错误码说明。