华为乾坤-配置NetStream全局配置:响应示例

时间:2025-02-17 11:37:29

响应示例

返回状态码为200:配置成功,响应体参考NetstreamResponse。

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" : {
		"config-status" : "",
		"errorInfo" : "",
		"flowInsts" : {
			"flowInst" : [
				{
					"flowType" : "IPv4",
					"sourceIpv4Address" : "192.168.1.1",
					"sourceIpv4Port" : 2000,
					"exportVersion" : 5,
					"indexSwitch" : 32,
					"tcpSessionTimeout" : false,
					"preClassify" : false,
					"sysMacEnable" : false,
					"originActiveAgeSeconds" : 1800,
					"originInactiveSeconds" : 15,
					"templateTimeoutRate" : 1,
					"exportIpV4Hosts" : [
						{
							"address" : "192.168.2.1",
							"port" : 2000,
							"vpnName" : "underlay_1",
							"dscpValue" : 15
						}
					]
				}
			]
		},
		"flexFlowRecords" : {
			"flexFlowRecord" : [
				{
					"flowType" : "IPv4",
					"recordName" : "record1",
					"protocol" : true,
					"tos" : true,
					"sourceAddress" : true,
					"destinationAddress" : true,
					"sourcePort" : true,
					"destinationPort" : true,
					"bytesValue" : true,
					"packetsValue" : false,
					"inputInterface" : false,
					"outputInterface" : false,
					"sdWanConnection" : false,
					"applicationName" : false,
					"sysMacEnable" : false
				}
			]
		},
		"tmAfterEnable" : false,
		"sourceIdExtendEnable" : false
	}
}

返回状态码为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

返回状态码为500:内部异常。

HTTP/1.1 500 Internal Server Error
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_0000002128678902.html