查询SNAT列表
更新时间 2024-09-14 10:59:07
最近更新时间: 2024-09-14 10:59:07
接口功能介绍
获取SNAT列表
接口约束
需要先创建 NAT 网关
接口是否审批
否
URI
GET /v4/vpc/list-snats
Content-Type
application/json
路径参数
无
Query参数
| Query参数 | 参数 | 是否必填 | 参数类型 | 说明 | 示例 |
|---|---|---|---|---|---|
| regionID | 是 | String | 区域id | xx73f321ea-62ff-11ec-a8bc-005056898fe0 | |
| natGatewayID | 否 | String | 要查询的NAT网关的ID。 | natgw-1o5sdqb7i2 | |
| sNatID | 否 | String | snat id | ||
| subnetID | 否 | String | 子网 id | ||
| pageNumber | 否 | Integer | 列表的页码,默认值为1。 | 11 | |
| pageSize | 否 | Integer | 分页查询时每页的行数,最大值为50,默认值为10。 | 10 |
请求头header参数
无
请求体body参数
无
响应参数
| 响应参数 | 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| statusCode | Integer | 返回状态码(800为成功,900为失败) | 800 | ||
| message | String | statusCode为900时的错误信息; statusCode为800时为success, 英文 | success | ||
| description | String | statusCode为900时的错误信息; statusCode为800时为成功, 中文 | 成功 | ||
| errorCode | String | statusCode为900时为业务细分错误码,三段式:product.module.code; statusCode为800时为SUCCESS | SUCCESS | ||
| returnObj | Array of Objects | 返回结果 | returnObj |
| 表 returnObj | 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| results | Array of Objects | snat 列表 | results | ||
| totalCount | Integer | 列表条目数 | 20 | ||
| currentCount | Integer | 分页查询时每页的行数。 | 4 | ||
| totalPage | Integer | 总页数 | 5 |
| 表 results | 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| sNatID | String | snat id | stb-SnatTableI | ||
| description | String | 描述信息 | sdafsdf | ||
| subnetCidr | String | 要查询的NAT网关所属VPC子网的cidr | 192.168.0.0/16 | ||
| subnetType | Integer | 子网类型:1-有vpcID的子网,0-自定义 | 1 | ||
| creationTime | String | 创建时间 | 2022-09-25T02:59:05.38Z | ||
| eips | Array of Objects | 绑定的 eip 信息 | eips | ||
| subnetID | String | 子网 ID | |||
| natGatewayID | String | nat 网关 ID |
| 表 eips | 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| eipID | String | 弹性 IP id | eip-xxxx | ||
| ipAddress | String | 弹性 IP 地址 | 1.1.1.1 |
枚举参数
无
请求头header示例
无
请求url示例
GET /openapi/v4/vpc/list-snats?regionID=81f7728662dd11ec810800155d307d5b
请求体body示例
无
响应示例
{
"statusCode":800,
"errorCode":"SUCCESS",
"message":"success",
"description":"成功",
"returnObj":{
"results":[
{
"sNatID":"xxx",
"description":"xxx",
"subnetCidr":"192.168.1.0/24",
"subnetID":"",
"subnetType":0,
"create_date":"2022-10-27T01:35:04Z",
"eips":[
{
"eipID":"eip-xxx",
"ipAddress":"1.1.1.1"
}
],
"natGatewayID":"natgw-xxxx"
}
],
"totalPage":1,
"totalCount":1,
"currentCount":1
}
}
状态码
| 状态码 | 描述 |
|---|---|
| 200 | 表示请求成功。 |
错误码
请参考错误码