华为乾坤-更新动态NAT策略:响应示例

时间:2025-02-17 11:38:06

响应示例

返回状态码为200:更新成功,响应体参考NatResponse。

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" : {
		"dynamicNatInfo" : [
			{
				"policyId" : "00000000-0000-0000-0000-000000000000",
				"isOverlay" : true,
				"vpnId" : "00000000-0000-0000-0000-000000000000",
				"siteId" : "00000000-0000-0000-0000-000000000000",
				"deviceId" : "00000000-0000-0000-0000-000000000000",
				"policyName" : "policyName",
				"linkId" : "00000000-0000-0000-0000-000000000000",
				"interfaceName" : "GE0/0/8",
				"natMode" : "EASY_IP",
				"startAddress" : "192.168.1.1",
				"endAddress" : "192.168.1.2",
				"natRuleInfos" : [
					{
						"ruleId" : "00000000-0000-0000-0000-000000000000",
						"priority" : 1,
						"action" : "permit",
						"protocol" : 6,
						"sourceIp" : "10.1.0.1/16",
						"destinationIp" : "10.2.0.1/16",
						"sourcePort" : 1,
						"destinationPort" : 1
					}
				]
			}
		],
		"staticNatInfo" : [
			{
				"policyId" : "00000000-0000-0000-0000-000000000000",
				"isOverlay" : true,
				"vpnId" : "00000000-0000-0000-0000-000000000000",
				"siteId" : "00000000-0000-0000-0000-000000000000",
				"deviceId" : "00000000-0000-0000-0000-000000000000",
				"policyName" : "policyName",
				"linkId" : "00000000-0000-0000-0000-000000000000",
				"interfaceName" : "GE0/0/8",
				"isUserDefined" : true,
				"externalIp" : "10.2.0.1",
				"internalIp" : "10.1.0.1",
				"translationType" : 1,
				"protocol" : "1",
				"externalPort" : 90,
				"internalPort" : 90,
				"addressMask" : 30,
				"advanceSetEnable" : false,
				"direction" : 1,
				"natRuleInfos" : [
					{
						"ruleId" : "00000000-0000-0000-0000-000000000000",
						"priority" : 1,
						"action" : "permit",
						"protocol" : 6,
						"sourceIp" : "10.1.0.1/16",
						"destinationIp" : "10.2.0.1/16",
						"sourcePort" : 1,
						"destinationPort" : 1
					}
				]
			}
		]
	}
}
support.huaweicloud.com/qiankuncmn-qiankuncs/toctopics/zh-cn_topic_0000001870548817.html