文档首页> 云数据库 GaussDB> API参考> API(推荐)> 实例管理> 查询已绑定的弹性公网IP列表
更新时间:2024-05-20 GMT+08:00
分享

查询已绑定的弹性公网IP列表

功能介绍

查询实例已绑定的弹性公网IP列表。

调试

您可以在API Explorer中调试该接口。

URI

GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/public-ips?offset={offset}&limit={limit}
表1 参数说明

名称

参数类型

是否必选

说明

project_id

String

租户在某一Region下的项目ID。

获取方法请参见获取项目ID

instance_id

String

实例ID。

offset

Integer

索引位置,偏移量。从第一条数据偏移offset条数据后开始查询,默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数。

limit

Integer

查询记录数。默认为50,不能为负数,最小值为1,最大值为50。

请求参数

无。

响应参数

表2 参数说明

名称

参数类型

说明

public_ips

Array of objects

查询实例已绑定EIP列表。

详情请参见表3

total_count

Integer

总记录数。

表3 public_ips字段数据结构说明

名称

参数类型

说明

public_ip_id

String

弹性公网ID。

public_ip_type

String

弹性公网类型。

port_id

String

端口ID。

public_ip_address

String

弹性公网IP。

private_ip_address

String

内网地址。

bandwidth_id

String

带宽ID。

bandwidth_name

String

带宽名称。

bandwidth_share_type

String

带宽共享类型。

bandwidth_size

Integer

带宽大小。

applied_at

String

修改时间,格式为“yyyy-mm-ddThh:mm:ssZ”。其中,T指某个时间的开始;Z指时区偏移量,例如北京时间偏移显示为+08:00。

请求示例

查询实例已绑定的弹性公网IP列表。

GET https://gaussdb-opengauss.cn-north-1.myhuaweicloud.com/v3/599628f2665841b2a66fa2780fadc025/instances/e0984e23578c4296950336e613d99d32in14/public-ips?offset=0&limit=1

响应示例

查询实例已绑定的弹性公网IP列表成功。

{ 
  "public_ips" : [ {
  "public_ip_id" : "78458261-5175-4254-8242-5959115d379a",
  "public_ip_type" : "5_g-vm",
  "port_id" : "a8d606bf-7e20-463d-afed-b7fc2909aa7d",
  "public_ip_address" : "100.95.156.144",
  "private_ip_address" : "192.168.0.133",
  "applied_at" : "2022-08-09T03:06:52+0800",
  "bandwidth_id" : "7ae23d75-3150-4957-94ae-9352b15f140e",
  "bandwidth_name" : "Bandwidth_2021-12-08-16-39-27",
  "bandwidth_size" : 5,
  "bandwidth_share_type" : "PER"
 } ],
  "total_count" : 1
}

状态码

错误码

请参见错误码

分享:

    相关文档

    相关产品