更新时间:2024-01-02 GMT+08:00
分享

查询弹性公网IP

功能介绍

获取弹性公网IP的详情信息。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v1/publicips/{publicip_id}

表1 路径参数

参数

是否必选

参数类型

描述

publicip_id

String

弹性公网IP ID。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

publicip

PublicIp object

弹性公网ip数据。

表4 PublicIp

参数

参数类型

描述

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的类型。

表5 Operator

参数

参数类型

描述

id

String

运营商ID。

name

String

运营商名称。

取值范围:

  • chinamobile:中国移动;

  • chinaunicom:中国联通;

  • chinatelecom:中国电信。

i18n_name

String

运营商国际化名称。

sa

String

运营商的简写。

请求示例

GET https://{endpoint}/v1/publicips/a943a83e-4920-4b8d-87bb-f777d3dce83a

响应示例

状态码: 200

OK

{
  "publicip" : {
    "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

错误码

请参见错误码

分享:

    相关文档

    相关产品