接口请求域名: edgezone.intl.tencentcloudapi.com 。
查询用户的公网Ip信息,对于路由模式为Static的公网实例,会返回所有已申请的公网Ip信息,对于路由模式为Ospf和Bgp的公网实例,会直接返回网段信息
默认接口请求频率限制:20次/秒。
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| Action | 是 | String | 公共参数,本接口取值:DescribePublicIps。 |
| Version | 是 | String | 公共参数,本接口取值:2026-04-01。 |
| Region | 是 | String | 公共参数,详见产品支持的 地域列表。 |
| NetworkInstanceId.N | 否 | Array of String | 按公网实例 ID 过滤(子串匹配,多个值取并集) |
| ZoneId | 否 | String | 按可用区/机房过滤 |
| Ip.N | 否 | Array of String | 按 IP 过滤(子串匹配,多个值取并集) |
| State.N | 否 | Array of String | 按状态过滤,可选值:InUse、Unbound(多个值取并集) |
| Type.N | 否 | Array of String | 按 IP 版本过滤,可选值:Ipv4、Ipv6(多个值取并集) |
| OrderByCreateTime | 否 | String | 按创建时间排序,可选值:asc、desc(默认 desc) |
| OrderByUpdateTime | 否 | String | 按更新时间排序,可选值:asc、desc(优先级高于创建时间排序) |
| Offset | 否 | Integer | 分页偏移量,默认 0 |
| Limit | 否 | Integer | 每页数量,默认 20,最大 100 |
| 参数名称 | 类型 | 描述 |
|---|---|---|
| TotalCount | Integer | 公网Ip总数 |
| IpInfoSet | Array of IpInfo | 分配的公网 IP 地址列表 |
| RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
POST / HTTP/1.1
Host: edgezone.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribePublicIps
<公共请求参数>
{
"ZoneId": "ap-beijing",
"State": [
"InUse"
],
"Type": [
"Ipv4"
],
"Offset": 0,
"Limit": 20
}
{
"Response": {
"RequestId": "test-req-028",
"TotalCount": 2,
"IpInfoSet": [
{
"Ip": "10.0.0.200",
"NetworkInstanceId": "epn-xxxxxxxx",
"InstanceId": "ins-001",
"State": "InUse",
"Type": "Ipv4",
"CreatedAt": "2026-04-07T00:00:00",
"UpdatedAt": "2026-04-07T00:00:00"
},
{
"Ip": "10.0.0.201",
"NetworkInstanceId": "epn-xxxxxxxx",
"InstanceId": "",
"State": "Unbound",
"Type": "Ipv4",
"CreatedAt": "2026-04-07T00:00:00",
"UpdatedAt": "2026-04-07T00:00:00"
}
]
}
}
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
| 错误码 | 描述 |
|---|---|
| InternalError | 内部错误。 |
| InvalidParameter | 参数错误。 |
文档反馈