查询SNAT规则列表
更新时间:2023-05-11
接口描述
本接口用于查询BEC NAT网关SNAT规则列表。
请求结构
GET /v1/nat/{natId}/snatRule HTTP/1.1
Host: bec.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
natId | NAT ID | path | 是 | string |
pageNo | 页码 | query | 否 | integer |
pageSize | 每页结果数 | query | 否 | integer |
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 参数说明 | 类型 |
---|---|---|
pageNo | 页码 | integer |
pageSize | 每页结果数 | integer |
result | SNAT规则列表 | List<SnatRuleVo> |
natId | NAT ID | string |
publicIpsAddress | EIP列表 | List<NatEipVo> |
ip | EIP | string |
serviceProvider | EIP运营商 | string |
ruleId | 规则ID | string |
ruleName | 规则名称 | string |
sourceCIDR | 源网段 | string |
status | 状态。active:可用,down:异常 | string |
totalCount | 结果总数 | integer |
错误码
请参照错误返回章节的内容。
请求示例
GET /v1/nat/nat-cn-changchun-ix-qotjedkx/snatRule HTTP/1.1
Host: bec.baidubce.com
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Wed, 08 Jul 2015 03:28:11 GMT
x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
Server: BWS
{
"result":[
{
"natId":"nat-cn-changchun-ix-qotjedkx",
"ruleId":"rule-acqj49qe39di",
"ruleName":"test",
"sourceCIDR":"192.168.0.4/32",
"publicIpsAddress":[
{
"ip": "1.1.1.1",
"serviceProvider": "CHINA_MOBILE"
}
],
"status":"active"
},
{
"natId":"nat-cn-changchun-ix-qotjedkx",
"ruleId":"rule-3fcldyjyg4bu",
"ruleName":"test",
"sourceCIDR":"192.168.0.3/32",
"publicIpsAddress":[
{
"ip": "1.1.1.1",
"serviceProvider": "CHINA_MOBILE"
}
],
"status":"active"
},
{
"natId":"nat-cn-changchun-ix-qotjedkx",
"ruleId":"rule-hmzrqnfko8cw",
"ruleName":"test",
"sourceCIDR":"192.168.0.2/32",
"publicIpsAddress":[
{
"ip": "1.1.1.1",
"serviceProvider": "CHINA_MOBILE"
}
],
"status":"active"
}
],
"orderBy":"createTime",
"order":"desc",
"pageNo":1,
"pageSize":1000,
"totalCount":3
}