查询弹性公网IP列表
功能介绍
获取弹性公网IP列表信息。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v1/publicips
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
limit |
否 |
Integer |
查询返回弹性IP列表数量。取值范围:0~1000。 最小值:0 最大值:1000 |
|
offset |
否 |
Integer |
查询的偏移量。 |
|
port_id |
否 |
String |
端口ID |
|
site_id |
否 |
String |
站点ID。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
count |
Integer |
弹性公网IP数目。 |
|
publicips |
Array of PublicIp objects |
弹性公网IP数组对象。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
id |
String |
弹性公网IP唯一标识。 |
|
status |
String |
弹性公网IP的状态。 |
|
port_id |
String |
端口的ID。 |
|
public_ip_address |
String |
弹性公网IP的地址。 |
|
private_ip_address |
String |
绑定弹性公网IP的私有IP地址。 |
|
create_time |
String |
创建时间。 |
|
bandwidth_id |
String |
带宽的ID。 |
|
bandwidth_name |
String |
带宽的名称。 最小长度:1 最大长度:64 |
|
bandwidth_share_type |
String |
带宽的类型。 |
|
bandwidth_size |
Integer |
带宽的大小。 最小值:300 最大值:2000 |
|
ip_version |
Integer |
IP版本的信息。 |
|
site_id |
String |
子网所属的站点ID。 |
|
site_info |
String |
子网所属的站点信息。 |
|
operator |
Operator object |
运营商信息。 |
|
type |
String |
弹性公网IP的类型。 |
请求示例
GET https://{endpoint}/v1/publicips
响应示例
状态码: 200
OK
{
"count" : 10,
"publicips" : [ {
"id" : "a943a83e-4920-4b8d-87bb-f777d3dce83a",
"status" : "ACTIVE",
"port_id" : "5dc619ab-2246-4383-8bd7-f37e1e3b89ab",
"public_ip_address" : "10.44.2.44",
"private_ip_address" : "192.168.0.212",
"create_time" : "2021-01-01T14:29:33Z",
"bandwidth_id" : "2c3a040c-7b4e-41a1-8b77-26ea7fe61548",
"bandwidth_name" : "edgeCloud_chengdu_CMCC-bandwidth-98f7",
"bandwidth_share_type" : "PER",
"bandwidth_size" : 5,
"ip_version" : 4,
"site_id" : "e3b52316-05be-11ea-bc35-286ed488d287",
"site_info" : "中国/华中地区/湖北/武汉市",
"operator" : {
"id" : 3,
"i18n_name" : "中国移动",
"sa" : "CMCC"
}
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
错误码
请参见错误码。