查询浮动IP列表
URI
GET /v2.0/floatingips
参数说明请参见表1。
|
参数 |
是否必选 |
类型 |
说明 |
|---|---|---|---|
|
id |
否 |
String |
浮动IP地址的id。 |
|
floating_ip_address |
否 |
String |
浮动IP地址(IPv4格式)。 |
|
floating_network_id |
否 |
String |
外部网络的id。 只能使用固定的外网,外部网络的信息请通过 GET /v2.0/networks?router:external=True或 GET /v2.0/networks?name={floating_network}或neutron net-external-list方式查询。 |
|
router_id |
否 |
String |
所属路由器id。 |
|
port_id |
否 |
String |
端口id。 |
|
fixed_ip_address |
否 |
String |
关联端口的私有IP地址。 |
|
tenant_id |
否 |
String |
项目ID。 |
|
limit |
否 |
Integer |
分页查询每页返回的记录个数,取值范围为0~intmax(2^31-1),默认值2000。 limit需要和marker配合使用,详细规则请见marker的参数说明。 |
|
marker |
否 |
String |
分页查询的起始资源ID,表示从指定资源的下一条记录开始查询。 marker需要和limit配合使用:
|
|
page_reverse |
否 |
Boolean |
False/True,是否设置分页的顺序。 |
样例:
GET https://{Endpoint}/v2.0/floatingips?id={fip_id}&router_id={router_id}&floating_network_id={net_id}&floating_ip_address={floating_ip}&port_id={port_id}&fixed_ip_address={fixed_ip}&tenant_id={tenant_id}
请求消息
无
响应消息
|
参数名称 |
类型 |
说明 |
|---|---|---|
|
floatingips |
Array of floatingip objects |
floatingip对象列表,参见表3。 |
|
参数 |
类型 |
说明 |
|---|---|---|
|
status |
String |
网络状态,可以为ACTIVE, DOWN或ERROR。
|
|
id |
String |
浮动IP地址的id。 |
|
project_id |
String |
项目ID |
|
floating_ip_address |
String |
浮动IP地址。 |
|
floating_network_id |
String |
外部网络的id。 |
|
router_id |
String |
所属路由器id。 |
|
port_id |
String |
端口id |
|
fixed_ip_address |
String |
关联端口的私有IP地址。 |
|
tenant_id |
String |
项目ID。 |
|
created_at |
String |
资源创建时间 采用UTC时间 格式:YYYY-MM-DDTHH:MM:SS |
|
updated_at |
String |
资源更新时间 采用UTC时间 格式:YYYY-MM-DDTHH:MM:SS |
|
参数名称 |
类型 |
说明 |
|---|---|---|
|
href |
String |
API链接 |
|
rel |
String |
API链接与该API版本的关系 |
请求示例
GET https://{Endpoint}/v2.0/floatingips?limit=1
响应示例
状态码: 200
GET操作正常返回
{
"floatingips" : [ {
"id" : "1a3a2818-d9b4-4a9c-8a19-5252c499d1cd",
"status" : "DOWN",
"router_id" : null,
"tenant_id" : "bbfe8c41dd034a07bebd592bf03b4b0c",
"project_id" : "bbfe8c41dd034a07bebd592bf03b4b0c",
"floating_network_id" : "0a2228f2-7f8a-45f1-8e09-9039e1d09975",
"fixed_ip_address" : null,
"floating_ip_address" : "99.99.99.84",
"port_id" : null,
"created_at" : "2017-10-19T12:21:28",
"updated_at" : "2018-07-30T12:52:13"
} ],
"floatingips_links" : [ {
"href" : "https://network.region.cn-test-2.clouds.com/v2.0/floatingips.json?limit=2000&marker=000a6144-5010-46f2-bf06-6a1c94477ea3&page_reverse=true",
"rel" : "previous"
}, {
"href" : "https://network.region.cn-test-2.clouds.com/v2.0/floatingips.json?limit=2000&marker=d445e537-bc81-4039-9c7b-f9c1f5c73c78",
"rel" : "next"
} ]
}
状态码
请参见状态码。
错误码
请参见错误码。