华为乾坤-查询防火墙设备NAT配置:响应示例

时间:2025-02-17 11:36:42

响应示例

返回状态码为200:查询的防火墙设备NAT配置。

HTTP/1.1 200 OK
Date: Sun,16 Feb 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
	"errcode" : "0",
	"errmsg" : "",
	"data" : {
		"pageIndex" : 1,
		"pageSize" : 20,
		"totalRecords" : 10,
		"deviceNatPolicys" : [
			{
				"name" : "nat1",
				"description" : "",
				"conversionMode" : 3,
				"destinationMode" : "address-to-address",
				"sourceZones" : [
					 "00000000-0000-0000-0000-000000000001"
				],
				"destinationZones" : [
					 "00000000-0000-0000-0000-000000000003"
				],
				"oldSourceIp" : "10.2.0.6/24",
				"oldDestinationIp" : "10.1.1.10",
				"sourceConvert" : 1,
				"newSourceIpGroup" : [
					 "10.1.1.10"
				],
				"newDestinationIpGroup" : [
					 "10.1.1.10"
				],
				"destinationPort" : "80,82-98",
				"serviceList" : [
					{
						"serviceType" : "tcp",
						"sourcePort" : "80",
						"destPort" : "80-97"
					}
				],
				"id" : "de5813f8ff1e41f5ba9c324da70b49ed",
				"priority" : 5
			}
		]
	}
}

返回状态码为400:校验失败信息。

HTTP/1.1 400 Bad Request
Date: Sun,16 Feb 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
support.huaweicloud.com/qiankuncmn-qiankuncs/toctopics/zh-cn_topic_0000001852345030.html