华为云用户手册

  • 响应示例 返回状态码为201:单板配置返回信息。 HTTP/1.1 201 Created Date: Sun,11 May 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" : { "slot" : "slot2", "model" : "ET1D2S04SX1E", "status" : "0" } } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为201:单板配置返回信息。 表4 ConfigResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" data REFERENCE 详细请参见表5。 - - 表5 BoardInfoDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 slot string 0~10个字符。 - 单板槽位。 "slot2" model string 0~20个字符。 - 单板对外型号。 "ET1D2S04SX1E" status string 0~10个字符。 - 单板状态,0---未知、1---不在位、2---在位、3---正常、4---故障、5---已删除、6---冲突。 "0" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /controller/campus/v1/networkservice/networkconfig/net/board/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/boards HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AC CES S-TOKEN: x-yyyyyy { "slot" : "slot2", "model" : "ET1D2S04SX1E" }
  • URI /controller/campus/v1/networkservice/networkconfig/net/board/devices/{deviceId}/boards 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 uuid 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
  • 响应参数 返回状态码为200:查询成功,响应体参考QuerySecurityPolicyResponse。 表2 QuerySecurityPolicyResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~256个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" totalRecords int32 [0-65535] - 总的数据条数。 10 pageSize int32 [0-65535] - 每页显示数量。 10 pageIndex int32 [0-65535] - 当前页数。 1 data ARRAY_REFERENCE 0-1000个列表项,详细请参见表10。 安全策略信息。 - 返回状态码为400:请求参数错误,无响应体。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误,无响应体。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:查询成功,响应体参考QuerySecurityPolicyResponse。 HTTP/1.1 200 OK Date: Sun,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "totalRecords" : 10, "pageSize" : 10, "pageIndex" : 1, "data" : [ { "id" : "00000000-0000-0000-0000-000000000000", "vpnId" : "00000000-0000-0000-0000-000000000000", "name" : "test_1", "status" : 1, "isActive" : true, "internetToUserRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "userToInternetRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "policyType" : false, "securityZone" : { "securityInterZones" : [ [ "test_1" ] ] }, "enableSecurityZones" : true, "securityZones" : { "sourceZones" : [ "test_1" ], "destZones" : [ "test_2" ] } } ] } 返回状态码为400:请求参数错误,无响应体。 HTTP/1.1 400 Bad Request Date: Sun,11 May 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,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 GET /controller/campus/v1/sdwan/policy/security/security-policies?pageIndex=0&pageSize=20&vpnId=00000000-0000-0000-0000-000000000000&sort=desc&id=00000000-0000-0000-0000-000000000000&policyName=site1 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • 响应示例 返回状态码为200:闪灯增强成功,响应体参考ResultDto。 HTTP/1.1 200 OK Date: Sun,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "error" }
  • 请求示例 HTTP的示例 PUT /controller/campus/v2/oamservice/devoam/device/blink/ea25fdbf-8dee-4823-bac2-5bfe8e3359ca HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "takeover" : true, "timeout" : 10, "leds" : [ { "ledName" : "sys-led", "status" : 0 } ] }
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ledCtrlParam 是 REFERENCE 详细请参见表3。 LED灯控制参数。 - 表3 LedCtrlParam对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 takeover 是 boolean true false - 是否使能LED灯的控制,使能后,灯的状态将由下面的参数指定。当参数为False时,timeout和leds不生效。 true timeout 否 integer [10-600] - LED灯熄灭的时间,当时间到期后,LED灯将恢复原有的功能。单位:秒。当takeover参数为true时,该项为必填项。 10 leds 否 REFERENCE 1-4个列表项,详细请参见表4。 指定需要控制的灯的状态列表。当takeover参数为true时,该项为必填项。 - 表4 leds对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ledName 否 string - - 指定要进行控制的灯的名字。系统灯---sys-led,控制灯---ctrl-led,网络灯---inet-led,USB灯---usb-led。 "sys-led" status 否 integer 0 1 2 - 灯状态。0---常灭,1---常亮,2---闪烁。 0
  • 响应示例 返回状态码为201:创建成功,响应体参考CommonRestResponse。 HTTP/1.1 201 Created Date: Sun,11 May 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" : { "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "aclNum" : 2100, "type" : "IPv4", "ruleList" : [ { "ruleId" : 10, "operateType" : 1, "ipRange" : "192.168.1.1/16" } ] } } 返回状态码为400:请求参数错误。 HTTP/1.1 400 Bad Request Date: Sun,11 May 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,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为201:创建成功,响应体参考CommonRestResponse。 表4 CommonRestResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errCode string 0~10个字符。 - 错误码。 "0" errMsg string 0~255个字符。 - 错误描述。 "" data REFERENCE 详细请参见表5。 - - 表5 VtyACLPolicyInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 siteId uuid 1~64个字符。 - 站点ID。 "00000000-0000-0000-0000-000000000000" deviceId uuid 1~64个字符。 - 设备ID。 "00000000-0000-0000-0000-000000000000" aclNum int32 [2000-2999] - ACL编号,同一设备的IPv4和IPv6的ACL编号不能相同。 2100 type string 0~8个字符。 IPv4 VTY ACL类型,该字段可以设置为以下几种: a) IPv4 b) IPv6 默认为IPv4。 "IPv4" ruleList ARRAY_REFERENCE 1-100个列表项,详细请参见表6。 ACL规则列表。配置ACL必须配置规则。 - 表6 ACLRule对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ruleId int64 [0-4294967294] - VTY ACL规则优先级。 10 operateType int32 - 1 操作类型,取值范围:1---允许、2---拒绝。默认值为1。 1 ipRange string - - IP地址范围,支持IPv4和IPv6,格式:IP地址/掩码或Any。其中IPv4的掩码范围为0-32,IPv6的掩码范围为1-128。若需要配置全地址(即IPv4掩码为0、IPv6前缀为0),可以输入“Any”(不区分大小写)。 IPv4地址如:192.168.1.1/16; IPv6地址如:fc22::1010/64。 "192.168.1.1/16" 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部异常。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/vty/acl HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "aclNum" : 2100, "type" : "IPv4", "ruleList" : [ { "ruleId" : 10, "operateType" : 1, "ipRange" : "192.168.1.1/16" } ] }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 aclPolicy 是 REFERENCE 详细请参见表2。 设备VTY ACL规则信息。 - 表2 VtyACLPolicyInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 是 uuid 1~64个字符。 - 站点ID。 "00000000-0000-0000-0000-000000000000" deviceId 是 uuid 1~64个字符。 - 设备ID。 "00000000-0000-0000-0000-000000000000" aclNum 是 int32 [2000-2999] - ACL编号,同一设备的IPv4和IPv6的ACL编号不能相同。 2100 type 否 string 0~8个字符。 IPv4 VTY ACL类型,该字段可以设置为以下几种: a) IPv4 b) IPv6 默认为IPv4。 "IPv4" ruleList 是 ARRAY_REFERENCE 1-100个列表项,详细请参见表3。 ACL规则列表。配置ACL必须配置规则。 - 表3 ACLRule对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ruleId 是 int64 [0-4294967294] - VTY ACL规则优先级。 10 operateType 是 int32 - 1 操作类型,取值范围:1---允许、2---拒绝。默认值为1。 1 ipRange 是 string - - IP地址范围,支持IPv4和IPv6,格式:IP地址/掩码或Any。其中IPv4的掩码范围为0-32,IPv6的掩码范围为1-128。若需要配置全地址(即IPv4掩码为0、IPv6前缀为0),可以输入“Any”(不区分大小写)。 IPv4地址如:192.168.1.1/16; IPv6地址如:fc22::1010/64。 "192.168.1.1/16"
  • 响应示例 返回状态码为200:重编排结果 HTTP/1.1 200 OK Date: Sun,11 May 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" : { "processStatus" : "running", "processProgress" : "100%" } } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,11 May 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,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:重编排结果 表1 ProgressResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表2。 拓扑编排进度信息。 - 表2 ProgressInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 processStatus string 0~8个字符。 - 编排process的状态:running、success、fail。 "running" processProgress string 0~8个字符。 - 进程进度,返回百分比数值。 "100%" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 GET /controller/campus/v1/sdwan/overlay-network/topology/progress HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/policy/security/security-policies HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "effectImmediate" : true, "securityPolicyInfo" : [ { "id" : "00000000-0000-0000-0000-000000000000", "vpnId" : "00000000-0000-0000-0000-000000000000", "name" : "test_1", "status" : 1, "isActive" : true, "internetToUserRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "userToInternetRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "policyType" : false, "securityZone" : { "securityInterZones" : [ [ "test_1" ] ] }, "enableSecurityZones" : true, "securityZones" : { "sourceZones" : [ "test_1" ], "destZones" : [ "test_2" ] } } ] }
  • 响应示例 返回状态码为201:创建成功,响应体参考SecurityPolicyResponse。 HTTP/1.1 201 Created Date: Sun,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "success" : [ { "id" : "00000000-0000-0000-0000-000000000000", "vpnId" : "00000000-0000-0000-0000-000000000000", "name" : "test_1", "status" : 1, "isActive" : true, "internetToUserRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "userToInternetRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "policyType" : false, "securityZone" : { "securityInterZones" : [ [ "test_1" ] ] }, "enableSecurityZones" : true, "securityZones" : { "sourceZones" : [ "test_1" ], "destZones" : [ "test_2" ] } } ], "fail" : [ { "errcode" : "0x00c8000c", "errmsg" : "The parameter is invalid.", "data" : { "id" : "00000000-0000-0000-0000-000000000000", "vpnId" : "00000000-0000-0000-0000-000000000000", "name" : "test_1", "status" : 1, "isActive" : true, "internetToUserRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "userToInternetRules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "action" : "deny", "protocolNum" : 6, "sourceIp" : "192.168.0.0/24", "targetIp" : "192.168.0.0/24", "sourcePort" : 6, "endSourcePort" : 6, "targetPort" : 6, "endTargetPort" : 6, "ipsProfile" : "strict", "avProfile" : "default", "urlProfile" : "default", "sourceIpAddressSets" : [ "sourceIpAddressSet" ], "targetIpAddressSets" : [ "targetIpAddressSet" ], "sourceGeoLocationSets" : [ { "key" : "", "name" : "" } ], "targetGeoLocationSets" : [ { "key" : "", "name" : "" } ], "sourceDomainSets" : [ "sourceDomainSet" ], "targetDomainSets" : [ "targetDomainSet" ], "sourceFeeds" : "ipFeed01", "ipFeed02" , "targetFeeds" : "ipFeed01", "ipFeed02" , "appGroups" : [ "appGroup" ], "effectiveTimeId" : "00000000-0000-0000-0000-000000000000", "effectiveTimeName" : "effectiveTimeName", "fileProfile" : "fileProfile01" } ], "policyType" : false, "securityZone" : { "securityInterZones" : [ [ "test_1" ] ] }, "enableSecurityZones" : true, "securityZones" : { "sourceZones" : [ "test_1" ], "destZones" : [ "test_2" ] } } } ] } 返回状态码为400:请求参数错误,无响应体。 HTTP/1.1 400 Bad Request Date: Sun,11 May 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,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应示例 返回状态码为201:创建成功,响应体参考RedirectPolicyResponse。 HTTP/1.1 201 Created Date: Sun,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "success" : { "vpnId" : "00000000-0000-0000-0000-000000000000", "fullReplace" : true, "redirectPolicies" : [ { "id" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "设备1", "policyName" : "redirect1", "devicePolicyName" : "pbr_devciePolicyName_1", "portType" : "EvpnTunnel", "portId" : "00000000-0000-0000-0000-000000000000", "portName" : "redirect1", "direction" : "inbound", "description" : "描述", "redirectRules" : [ { "ruleId" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "classificationId" : "00000000-0000-0000-0000-000000000000", "classificationName" : "流分类模板1", "behaviorId" : "00000000-0000-0000-0000-000000000000", "behaviorName" : "Behavior", "behaviorAction" : "permit" } ] } ] }, "fail" : [ { "errcode" : "0x00c8000c", "errmsg" : "The parameter is invalid.", "data" : { "vpnId" : "00000000-0000-0000-0000-000000000000", "fullReplace" : true, "redirectPolicies" : [ { "id" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "设备1", "policyName" : "redirect1", "devicePolicyName" : "pbr_devciePolicyName_1", "portType" : "EvpnTunnel", "portId" : "00000000-0000-0000-0000-000000000000", "portName" : "redirect1", "direction" : "inbound", "description" : "描述", "redirectRules" : [ { "ruleId" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "classificationId" : "00000000-0000-0000-0000-000000000000", "classificationName" : "流分类模板1", "behaviorId" : "00000000-0000-0000-0000-000000000000", "behaviorName" : "Behavior", "behaviorAction" : "permit" } ] } ] } } ] } 返回状态码为400:请求参数错误,无响应体。 HTTP/1.1 400 Bad Request Date: Sun,11 May 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,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为201:创建成功,响应体参考RedirectPolicyResponse。 表6 RedirectPolicyResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" success REFERENCE 详细请参见表7。 成功的重定向策略信息列表 - fail ARRAY_REFERENCE 0-100个列表项,详细请参见表10。 失败的重定向策略信息列表。 - 表7 RedirectPolicyInfos对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 vpnId uuid - - VPN ID,必填。 "00000000-0000-0000-0000-000000000000" fullReplace boolean true false false 仅更新操作有效,false增量更新redirectRules,true全量更新redirectRules,默认值false。 true redirectPolicies ARRAY_REFERENCE 1-100个列表项,详细请参见表8。 重定向策略列表 - 表8 RedirectPolicyInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id uuid - - 策略ID,修改或删除的时候必填。 "00000000-0000-0000-0000-000000000000" deviceId uuid - - 设备ID,创建的时候必填。 "00000000-0000-0000-0000-000000000000" deviceName string 0~64个字符。 - 设备名称,无需填写,仅查询时使用。 "设备1" policyName string 0~64个字符。 - 策略名称,创建的时候必填。 "redirect1" devicePolicyName string 0~15个字符。 - 设备上的策略名称。 创建时如不填写,将自动生成以“redirect_”开头的名称; 如填写,区分大小写,不能包含空格、?、-、"及“redirect_”开头的名称; 不允许修改。 "pbr_devciePolicyName_1" portType string EvpnTunnel InterworkingTunnel LanInterface InterCPELink - 接口类型,创建时必填。 "EvpnTunnel" portId uuid - - LAN侧接口ID,仅当portType为LanInterface时有效,创建时必填。 "00000000-0000-0000-0000-000000000000" portName string 0~128个字符。 - LAN侧接口名称,无需填写,仅查询时使用。 "redirect1" direction string 7~8个字符。 - 策略方向,取值范围:inbound、outbound。非必填,创建时不填表示inbound,修改时不填表示保持修改前的值不变。 "inbound" description string 0~64个字符。 - 描述 "描述" redirectRules ARRAY_REFERENCE 0-100个列表项,详细请参见表9。 Redirect规则,创建的时候必填。 - 表9 RedirectRule对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ruleId uuid - - RedirectRule ID。修改时,若ruleId为空,表示向重定向策略添加一条Rule;若ruleId不为空,表示修改对应的Rule。 "00000000-0000-0000-0000-000000000000" priority int32 [1-5000] - 优先级,范围1到5000,1高,5000低,建议步长10,创建的时候必填。 1 classificationId uuid - - 流分类模板ID,创建的时候必填。 "00000000-0000-0000-0000-000000000000" classificationName string 0~64个字符。 - 流分类模板名称,无需填写,仅查询时使用。 "流分类模板1" behaviorId uuid - - 重定向策略行为模板ID。 与behaviorAction不能同时配置,且创建时必须配置其中一个。 "00000000-0000-0000-0000-000000000000" behaviorName string 0~64个字符。 - 重定向策略行为模板名称,无需填写,仅查询时使用。 "Behavior" behaviorAction string 4~6个字符。 - 重定向策略行为动作,取值范围:permit(允许)、deny(拒绝),区分大小写。 与behaviorId不能同时配置,且创建时必须配置其中一个。 "permit" 表10 FailRedirectPolicyInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0x00c8000c" errmsg string - - 错误信息。 "The parameter is invalid." data REFERENCE 详细请参见表7。 重定向策略信息 - 返回状态码为400:请求参数错误,无响应体。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误,无响应体。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/policy/traffic/redirect-policy/sites/00000000-0000-0000-0000-000000000000 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "vpnId" : "00000000-0000-0000-0000-000000000000", "fullReplace" : true, "redirectPolicies" : [ { "id" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "设备1", "policyName" : "redirect1", "devicePolicyName" : "pbr_devciePolicyName_1", "portType" : "EvpnTunnel", "portId" : "00000000-0000-0000-0000-000000000000", "portName" : "redirect1", "direction" : "inbound", "description" : "描述", "redirectRules" : [ { "ruleId" : "00000000-0000-0000-0000-000000000000", "priority" : 1, "classificationId" : "00000000-0000-0000-0000-000000000000", "classificationName" : "流分类模板1", "behaviorId" : "00000000-0000-0000-0000-000000000000", "behaviorName" : "Behavior", "behaviorAction" : "permit" } ] } ] }
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 redirectPolicyInfos 是 REFERENCE 详细请参见表3。 创建重定向策略请求数据。 - 表3 RedirectPolicyInfos对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 vpnId 是 uuid - - VPN ID,必填。 "00000000-0000-0000-0000-000000000000" fullReplace 否 boolean true false false 仅更新操作有效,false增量更新redirectRules,true全量更新redirectRules,默认值false。 true redirectPolicies 否 ARRAY_REFERENCE 1-100个列表项,详细请参见表4。 重定向策略列表 - 表4 RedirectPolicyInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 否 uuid - - 策略ID,修改或删除的时候必填。 "00000000-0000-0000-0000-000000000000" deviceId 否 uuid - - 设备ID,创建的时候必填。 "00000000-0000-0000-0000-000000000000" deviceName 否 string 0~64个字符。 - 设备名称,无需填写,仅查询时使用。 "设备1" policyName 否 string 0~64个字符。 - 策略名称,创建的时候必填。 "redirect1" devicePolicyName 否 string 0~15个字符。 - 设备上的策略名称。 创建时如不填写,将自动生成以“redirect_”开头的名称; 如填写,区分大小写,不能包含空格、?、-、"及“redirect_”开头的名称; 不允许修改。 "pbr_devciePolicyName_1" portType 否 string EvpnTunnel InterworkingTunnel LanInterface InterCPELink - 接口类型,创建时必填。 "EvpnTunnel" portId 否 uuid - - LAN侧接口ID,仅当portType为LanInterface时有效,创建时必填。 "00000000-0000-0000-0000-000000000000" portName 否 string 0~128个字符。 - LAN侧接口名称,无需填写,仅查询时使用。 "redirect1" direction 否 string 7~8个字符。 - 策略方向,取值范围:inbound、outbound。非必填,创建时不填表示inbound,修改时不填表示保持修改前的值不变。 "inbound" description 否 string 0~64个字符。 - 描述 "描述" redirectRules 否 ARRAY_REFERENCE 0-100个列表项,详细请参见表5。 Redirect规则,创建的时候必填。 - 表5 RedirectRule对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ruleId 否 uuid - - RedirectRule ID。修改时,若ruleId为空,表示向重定向策略添加一条Rule;若ruleId不为空,表示修改对应的Rule。 "00000000-0000-0000-0000-000000000000" priority 否 int32 [1-5000] - 优先级,范围1到5000,1高,5000低,建议步长10,创建的时候必填。 1 classificationId 否 uuid - - 流分类模板ID,创建的时候必填。 "00000000-0000-0000-0000-000000000000" classificationName 否 string 0~64个字符。 - 流分类模板名称,无需填写,仅查询时使用。 "流分类模板1" behaviorId 否 uuid - - 重定向策略行为模板ID。 与behaviorAction不能同时配置,且创建时必须配置其中一个。 "00000000-0000-0000-0000-000000000000" behaviorName 否 string 0~64个字符。 - 重定向策略行为模板名称,无需填写,仅查询时使用。 "Behavior" behaviorAction 否 string 4~6个字符。 - 重定向策略行为动作,取值范围:permit(允许)、deny(拒绝),区分大小写。 与behaviorId不能同时配置,且创建时必须配置其中一个。 "permit"
  • 请求示例 HTTP的示例 DELETE /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-nvo3:nvo3/Nve1 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy restconf-transaction-id: "00000000-0000-0000-0000-000000000000"
  • 响应示例 返回状态码为200:操作成功。 HTTP/1.1 200 OK Date: Sun,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为400:请求参数错误。 HTTP/1.1 400 Bad Request Date: Sun,11 May 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,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-nvo3:nvo3/{source-nve} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 36个字符。满足正则表达[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}。 - 设备ID。 "00000000-0000-0000-0000-000000000000" source-nve 是 string 1~63个字符。 - 源端接口,仅支持NVE口,单一主键字段。 "Nve1"
  • 响应示例 返回状态码为200:查询成功,返回结果。 HTTP/1.1 200 OK Date: Sun,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "id" : "3814d9aa-8d46-42ee-9194-dc17d0c21888", "account" : "support_e@huawei.com" } 返回状态码为400:参数错误。配置冲突。 HTTP/1.1 400 Bad Request Date: Sun,11 May 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,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应示例 返回状态码为200:操作成功。 HTTP/1.1 200 OK Date: Sun,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为400:请求参数错误。 HTTP/1.1 400 Bad Request Date: Sun,11 May 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,11 May 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 DELETE /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-static-routing-ipv4:static-routing-ipv4 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy restconf-transaction-id: "00000000-0000-0000-0000-000000000000"
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-static-routing-ipv4:static-routing-ipv4 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 36个字符。满足正则表达[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}。 - 设备ID。 "00000000-0000-0000-0000-000000000000"
共100000条
提示

您即将访问非华为云网站,请注意账号财产安全