华为云用户手册

  • 响应示例 返回状态码为200:操作成功。 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 { "huawei-nce-e-syslog:global-parameter" : { "interface-name" : "1", "buffer-size" : 1, "log-timestamp" : "date-boot", "log-timezone" : true, "debug-timestamp" : "date-boot", "debug-timezone" : true, "trap-timestamp" : "date-boot", "trap-timezone" : true, "statistic-suppress" : true } } 返回状态码为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
  • 请求示例 HTTP的示例 GET /controller/campus/api/v1/devoam/config/aphealingreset/sites/4f350825-919c-47b7-b853-f51f15912396 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
  • 响应参数 返回状态码为200:查询成功,响应体参考HealingResetConfigResult。 表2 HealingResetConfigResult对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "查询失败" data REFERENCE 详细请参见表3。 接口返回的具体数据。 - 表3 HealingResetConfig对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 healingResetEnable boolean true false true AP设备逃生配置使能。默认值为true。 该字段对应UI页面上是:UI【设备逃生策略配置】 true period int32 [6-168] - 开始自动检测重启的时间,该字段的取值范围是6-168(单位:小时)。 当healingResetEnable字段是true时,必须设置该字段。 该字段对应UI页面上是:UI【断连超时时间(小时)】 6 返回状态码为400:校验异常,无响应体。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:查询成功,响应体参考HealingResetConfigResult。 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" : { "healingResetEnable" : true, "period" : 6 } } 返回状态码为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
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/networkservice/networkconfig/net/lswstp/sites/fbb684c8-0d37-496f-bafa-4b06db151e2e/stp 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 { "stpMode" : 1, "mstpRegions" : [ { "regionId" : "fbb684c8-0d37-496f-bafa-4b06e5151e2e", "regionName" : "stp_region", "revisionLevel" : 0, "mstpRegionInstances" : [ { "instanceId" : 0, "mapVlan" : "1,3-10", "regionInstanceDevices" : [ { "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "priority" : 15 } ] } ], "regionDeviceList" : [ { "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "LSW" } ] } ], "rstpConfig" : [ { "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "priority" : 15 } ] }
  • 响应示例 返回状态码为200:修改成功。 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" : { "stpMode" : 1, "mstpRegions" : [ { "regionId" : "fbb684c8-0d37-496f-bafa-4b06e5151e2e", "regionName" : "stp_region", "revisionLevel" : 0, "mstpRegionInstances" : [ { "instanceId" : 0, "mapVlan" : "1,3-10", "regionInstanceDevices" : [ { "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "priority" : 15 } ] } ], "regionDeviceList" : [ { "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "deviceName" : "LSW" } ] } ], "rstpConfig" : [ { "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "priority" : 15 } ] } }
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 body 是 REFERENCE 详细请参见表3。 站点内交换机的STP配置参数体。 - 表3 StpDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 stpMode 是 integer [1-2] - STP模式。1表示MSTP,2表示RSTP。 1 mstpRegions 否 ARRAY_REFERENCE 1-8个列表项,详细请参见表4。 MST域集合。MSTP模式下需要配置。 - rstpConfig 否 ARRAY_REFERENCE 1-8个列表项,详细请参见表7。 RSTP优先级。RSTP模式下需要配置。 - 表4 MstpRegion对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 regionId 否 string - - 域ID,UUID格式。创建时自动生成。 "fbb684c8-0d37-496f-bafa-4b06e5151e2e" regionName 是 string 1~32个字符。 - 域名 。 "stp_region" revisionLevel 是 int64 [0-65535] - 修订级别。 0 mstpRegionInstances 是 ARRAY_REFERENCE 1-16个列表项,详细请参见表5。 生成树实例集合。 - regionDeviceList 否 ARRAY_REFERENCE 1-16个列表项,详细请参见表6。 设备ID实例集合。 - 表5 MstpRegionInstance对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 instanceId 是 integer [0-4094] - 生成树实例ID。 0 mapVlan 否 string 1~100个字符。 - 映射VLAN,instancdId不为0的生成树才生效。 "1,3-10" regionInstanceDevices 是 ARRAY_REFERENCE 1-100个列表项,详细请参见表7。 生成树实例下设备集合。 - 表6 RegionDeviceList对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string - - 设备ID,字符串格式为UUID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" deviceName 是 string - - 设备Name。 "LSW" 表7 RegionInstanceDevice对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string - - 设备ID,字符串格式为UUID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" priority 否 integer [0-15] - 设备优先级。 15
  • 响应示例 返回状态码为200:修改成功,响应体参考FirewallPolicyResponse。 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" : "", "success" : [ { "id" : "00000000-0000-0000-0000-000000000000", "vpnId" : "00000000-0000-0000-0000-000000000000", "name" : "test_1", "status" : 1, "isActive" : true, "internetToUserDefaultAction" : "deny", "internetToUserFwFilters" : [ { "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, "targetPort" : 6, "description" : "app" } ], "userToInternetDefaultAction" : "permit", "userToInternetFwFilters" : [ { "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, "targetPort" : 6, "description" : "app" } ], "internetToUserSessionLogEnable" : false, "userToInternetSessionLogEnable" : false, "policyType" : false, "securityZone" : { "securityInterZones" : [ [ "test_1" ] ] } } ], "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, "internetToUserDefaultAction" : "deny", "internetToUserFwFilters" : [ { "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, "targetPort" : 6, "description" : "app" } ], "userToInternetDefaultAction" : "permit", "userToInternetFwFilters" : [ { "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, "targetPort" : 6, "description" : "app" } ], "internetToUserSessionLogEnable" : false, "userToInternetSessionLogEnable" : false, "policyType" : false, "securityZone" : { "securityInterZones" : [ [ "test_1" ] ] } } } ] } 返回状态码为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
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/sdwan/policy/security/firewall-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, "firewallPolicies" : [ { "id" : "00000000-0000-0000-0000-000000000000", "vpnId" : "00000000-0000-0000-0000-000000000000", "name" : "test_1", "status" : 1, "isActive" : true, "internetToUserDefaultAction" : "deny", "internetToUserFwFilters" : [ { "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, "targetPort" : 6, "description" : "app" } ], "userToInternetDefaultAction" : "permit", "userToInternetFwFilters" : [ { "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, "targetPort" : 6, "description" : "app" } ], "internetToUserSessionLogEnable" : false, "userToInternetSessionLogEnable" : false, "policyType" : false, "securityZone" : { "securityInterZones" : [ [ "test_1" ] ] } } ] }
  • URI /controller/campus/v1/sdwan/overlay-network/{vpnId}/topology/policy 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 vpnId 是 uuid - - VPN ID,UUID格式。 "00000000-0000-0000-0000-000000000000" 表2 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 policyName 否 string - - 自定义策略名称。不填时表示查vpn下的所有策略,填写时表示查询指定名称的策略。 "connectionPolicy" pageIndex 否 int32 - - 当前页数,为空表示查询所有页。 - pageSize 否 int32 - - 每页显示数量,为空表示查询所有页 -
  • 响应参数 返回状态码为200:查询拓扑自定义策略成功。 表3 CustomPolicyPageResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" customPolicys ARRAY_REFERENCE 1-100个列表项,详细请参见表13。 自定义策略。 - totalRecords int32 - - 总的数据条数。 10 pageSize int32 - - 每页显示数量。 10 pageIndex int32 - - 当前页数。 1 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 GET /controller/campus/v1/sdwan/overlay-network/00000000-0000-0000-0000-000000000000/topology/policy?policyName=connectionPolicy 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:查询拓扑自定义策略成功。 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" : "", "customPolicys" : [ { "id" : "00000000-0000-0000-0000-000000000000", "policyName" : "partialMeshPolicy", "priority" : 1, "rules" : [ { "id" : "00000000-0000-0000-0000-000000000000", "matchCondition" : { "ipAddressPrefix" : { "prefixFilters" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 24, "lessEqual" : 24 } ], "ipv6PrefixFilters" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ipv6Address" : "fc00::", "maskLength" : 96, "greaterEqual" : 96, "lessEqual" : 96 } ] }, "siteIds" : ["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001"], "siteNames" : ["siteName1","siteName2"] }, "applyAction" : { "siteSource" : "tenant", "nextHops" : [ { "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "Site Name", "preference" : 2 } ], "applyMode" : "additive", "mode" : "permit" } } ], "applyToSites" : ["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001"], "applyToSiteNames" : ["siteName1","siteName2"] } ], "totalRecords" : 10, "pageSize" : 10, "pageIndex" : 1 } 返回状态码为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
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 body 是 REFERENCE 详细请参见表3。 car模式参数体。 - 表3 CarmodeDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 carmode 是 string 0~20个字符。 - car模式 可填ipv4-mixed | dual-stack | ipv4-single | default。 "ipv4-single"
  • 响应示例 返回状态码为200:操作成功。 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 { "huawei-nce-e-dhcpv4:relay" : { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "global" : { "trust-option82" : true, "reply-forward-all" : true } } } 返回状态码为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
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-dhcpv4:relay 表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"
  • 请求示例 HTTP的示例 GET /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-dhcpv4:relay 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:操作成功。 表3 relay-info对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-dhcpv4:relay REFERENCE 详细请参见表4。 配置DHCP relay。 - 表4 relay对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 config-status string reserved initial configuring-database configured-database-success configured-database-failed configuring-device configured-device-success configured-device-failed reserved 配置状态,对应保留未用状态、初始状态、数据库存储中状态、预配置状态、数据库存储失败状态、部署中状态、成功状态、失败状态;不支持编辑,仅查询返回。 "configured-database-success" last-committed-time string 0~255个字符。 - 最后提交时间,该特性最后提交时间;不支持编辑,仅查询返回。 "2022-01-01 00:00:00" related-pkg-version string 0~255个字符。 - 包版本,插件包版本;不支持编辑,仅查询返回。 "1.0.1" edit-state string RUNNING CANDIDATE UNDEPLOYING UNDEPLOYED - 编辑状态,对应运行状态、候选状态、取消部署状态、未部署状态;不支持编辑,仅查询返回。 "RUNNING" global REFERENCE 详细请参见表5。 中继全局配置。 - 表5 global对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 trust-option82 boolean true false true DHCP relay agent使能Option 82开关。AR6700V主设备和AR6700V子设备不支持。 true reply-forward-all boolean true false false DHCP relay agent使能转发所有DHCP ACK消息。AR6700V主设备和AR6700V子设备不支持。 true 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:删除路由器设备静态路由配置成功。 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" : "", "success" : [ "de5813f8ff1e41f5ba9c324da70b49ed" ], "fail" : { "errcode" : "0x00c80014", "errmsg" : "The id does not exist.", "id" : "c8eb0831aaa843e9a123cb6f051195b8" } } 返回状态码为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
  • 请求示例 HTTP的示例 POST /controller/campus/v1/networkservice/networkconfig/net/arstaticroute/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/staticroute/action/batch-delete 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 { "ids" : [ "de5813f8ff1e41f5ba9c324da70b49ed" ] }
  • URI /controller/campus/v1/networkservice/networkconfig/net/arstaticroute/devices/{deviceId}/staticroute/action/batch-delete 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
  • 响应示例 返回状态码为200:查询返回的站点模板信息。 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 { "pageIndex" : 1, "pageSize" : 20, "totalRecords" : 1, "errcode" : "0", "errmsg" : "", "data" : [ { "id" : "fbde1c5d-5b94-49e3-a912-48641015e451", "name" : "siteTemplate1", "types" : [ "AP" ], "capabilities" : ["AP","FW","LSW"], "custom" : true, "configIdentifies" : "snmp" } ] } 返回状态码为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
  • 请求示例 HTTP的示例 GET /controller/campus/v1/networkservice/networkconfig/site-templates?pageSize=20&pageIndex=1&sort=name&keyWord=siteTem1 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:查询返回的站点模板信息。 表2 GetSiteTempResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 pageIndex int32 [0-1000] - 页码。 1 pageSize int32 [0-1000] - 每页大小。 20 totalRecords int32 [0-10000] - 总数。 1 errcode string 0~1000个字符。 0 错误码。 "0" errmsg string 0~1000个字符。 错误信息。 "" data ARRAY_REFERENCE 0-100个列表项,详细请参见表4。 站点模板列表。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部服务错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 PATCH /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-nat-address-group:snat-address-group/name 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" { "huawei-nce-e-nat-address-group:snat-address-group" : { "name" : "name", "mode" : "full-cone", "mode-pattern" : { "reverse-enable" : true, "address-zone" : "global" }, "sections" : { "section" : [ { "section-id" : 5, "start-ip" : "192.168.1.2", "end-ip" : "192.168.1.5" } ] }, "vrid" : 6, "port-block" : { "size" : 10, "extended-times" : 1, "start-port" : 1000, "end-port" : 1100 } } }
  • 响应示例 返回状态码为200:操作成功。 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 返回状态码为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
  • 请求参数 表2 header参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 restconf-transaction-id 是 string - - 事务ID。 "00000000-0000-0000-0000-000000000000" 表3 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-nat-address-group:snat-address-group 是 REFERENCE 详细请参见表4。 源NAT地址池。 -
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-nat-address-group:snat-address-group/{name} 表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" name 是 string 1~34个字符。 - 源NAT地址池名称,单一主键字段。 "name"
  • 响应示例 返回状态码为201:修改StaticMac成功。 HTTP/1.1 201 Created 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" : { "macAddress" : "XX:XX:XX:XX:XX:XX", "vlanId" : 1, "interfaceName" : "GigabitEthernet0/0/1", "id" : "de5813f8ff1e41f5ba9c324da70b49ed" } } 返回状态码为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
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 body 是 REFERENCE 详细请参见表3。 MAC静态绑定配置的参数体。 - 表3 StaticMacConfigDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 macAddress 是 string 17个字符。 - mac地址,mac格式:XX:XX:XX:XX:XX:XX。 "XX:XX:XX:XX:XX:XX" vlanId 是 integer [1-4094] - vlanId,在与mac进行绑定之前,需要将接口加入对应的VLAN。 1 interfaceName 是 string 1~30个字符。 - 端口名称。 "GigabitEthernet0/0/1" id 是 string 32个字符。 - MAC静态绑定配置ID。 "de5813f8ff1e41f5ba9c324da70b49ed"
共100000条