华为云用户手册

  • 响应示例 返回状态码为201:创建成功,返回体参考WocPolicyResponse。 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", "name" : "WocPolicy", "priority" : 1, "vpnId" : "00000000-0000-0000-0000-000000000000", "optimizationType" : "FEC", "isActive" : true, "status" : 10, "fecData" : { "antiLossType" : "A-FEC", "lossRate" : 1, "blockSize" : 40, "timeout" : 40, "mtu" : 400, "continuousLoss" : 10 }, "compressionData" : { "compressionType" : "LZ4" }, "classifytemplate" : { "id" : "00000000-0000-0000-0000-000000000000", "templateName" : "template" }, "timeTemplate" : { "id" : "00000000-0000-0000-0000-000000000000", "templateName" : "timeTemplate" } } ], "fail" : [ { "errcode" : "0x00c8000c", "errmsg" : "The parameter is invalid.", "data" : { "id" : "00000000-0000-0000-0000-000000000000", "name" : "WocPolicy", "priority" : 1, "vpnId" : "00000000-0000-0000-0000-000000000000", "optimizationType" : "FEC", "isActive" : true, "status" : 10, "fecData" : { "antiLossType" : "A-FEC", "lossRate" : 1, "blockSize" : 40, "timeout" : 40, "mtu" : 400, "continuousLoss" : 10 }, "compressionData" : { "compressionType" : "LZ4" }, "classifytemplate" : { "id" : "00000000-0000-0000-0000-000000000000", "templateName" : "template" }, "timeTemplate" : { "id" : "00000000-0000-0000-0000-000000000000", "templateName" : "timeTemplate" } } } ] } 返回状态码为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的示例 { "compareDto": [ { "objectId": "02fb5ed9-3ae4-4563-9973-34cabbc628b6", "objectType": "siteTemplate", "configId": "9b61f430dd784affbc2fad92fcbc53a1", "compareType": 0 }, { "objectId": "c3bccf76-ebb9-4edd-b84d-3482981c2745", "objectType": "siteTemplate", "configId": "41eadc1925114523bc56095cf40cdfb9", "compareType": 1 } ] }
  • 响应示例 返回状态码为200:操作成功。 { "errcode": "0", "errmsg": "", "data": [ { "compareType": 0, "objectId": "02fb5ed9-3ae4-4563-9973-34cabbc628b6", "configId": "9b61f430dd784affbc2fad92fcbc53a1", "configValues": [ { "configKey": "ap.basic.config", "parentConfigKey": "", "configName": "基本配置", "strValue": null, "boolValue": null, "listValue": null, "valueType": null, "isDiff": null }, { "configKey": "ap.ssid.name", "parentConfigKey": "ap.basic.config", "configName": "SSID名称", "strValue": "ssd1", "boolValue": null, "listValue": null, "valueType": "STRING", "isDiff": null } ] } ] } 返回状态码为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
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 input 是 REFERENCE 详细请参见表3。 查询参数 - 表3 CompareConfigDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 compareDto 否 ARRAY_REFERENCE 1-6个列表项,详细请参见表4。 特性比较值 - 表4 CompareConfigObj对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 objectId 是 string 36个字符。 - 对象id "fbde1c5d-5b94-49e3-a912-48641015e45c" objectType 是 string 1~20个字符。满足正则表达deviceGroup|siteTemplate。 - 对象类型 "deviceGroup" configId 否 string 0~64个字符。 - 对于列表型的配置需要比较具体的某条特性通过configId确认 "fbde1c5d-5b94-49e3-a912-48641015e45c" compareType 是 int32 [0-1] - 比较类型0表示基准,1表示非基准 0
  • 请求示例 HTTP的示例 PUT /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-arp:arp-if 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 restconf-transaction-id: "00000000-0000-0000-0000-000000000000" { "huawei-nce-e-arp:arp-if" : [ { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "if-name" : "GE0/0/3", "arp-proxy" : false, "route-proxy-enable" : true, "miss-anti-limit" : 333, "arp-limit" : [ { "vlan-id" : 444, "limit-num" : 555 } ], "ipv4" : { "static-arp" : [ { "ip-addr" : "10.1.1.4", "mac-addr" : "xxxx-xxxx-xxxx" } ] } } ] }
  • 响应示例 返回状态码为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
  • 请求参数 表2 header参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 restconf-transaction-id 是 string - - 事务ID。 "00000000-0000-0000-0000-000000000000" 表3 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-arp:arp-if 是 REFERENCE 详细请参见表4。 接口ARP配置。 - 表4 nes-ne-arp-if-augment对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-arp:arp-if 否 ARRAY_REFERENCE 详细请参见表5。 接口ARP配置。 - 表5 nes-ne-arp-if对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 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" if-name 否 string 1~63个字符。 - 接口名称,单一主键字段。 "GE0/0/3" arp-proxy 否 boolean true false - 使能/去使能接口ARP代理功能。 false route-proxy-enable 否 boolean true false false 使能/去使能路由式ARP代理功能。 true miss-anti-limit 否 int64 [0-65536] 0 在接口上抑制ARP MISS消息的速率,以限制超过速率抑制的报文或消息的速率。 333 arp-limit 否 ARRAY_REFERENCE 详细请参见表6。 ARP表项限制。 - ipv4 否 REFERENCE 详细请参见表7。 IPv4配置。 - 表6 nes-ne-arp-if-arp-limit对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 vlan-id 否 int32 [0-4094] - VLAN ID,单一主键字段。 444 limit-num 否 int64 [1-1048576] - 最大表项数目。 555 表7 ipv4对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 static-arp 否 ARRAY_REFERENCE 详细请参见表8。 静态ARP。 - 表8 ipv4-static-arp对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ip-addr 否 string 满足正则表达(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?。 - IPv4地址,单一主键字段。 "10.1.1.4" mac-addr 是 string 0~255个字符。满足正则表达[0-9a-f]{4}(-[0-9a-f]{4}){2}。 - MAC地址。 "xxxx-xxxx-xxxx"
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-arp:arp-if 表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"
  • 响应参数 返回状态码为200:操作成功。 表4 BatchOperateTemplateGroupWithTaskResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码,0:请求成功。 "0" errmsg string 0~256个字符。 - 错误信息。 "error" data ARRAY_REFERENCE 0-20个列表项,详细请参见表4。 操作成功的Id集,结构体参见BatchOperateTemplateGroupItem。 - taskId string 0~256个字符。 - 任务Id。 "1651231231" 返回状态码为400:校验异常。 CommonDto对象的参数列表,详细请参见表4。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为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" : "error", "data" : [ { "Id" : "" } ], "taskId" : "1651231231" } 返回状态码为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 { "errcode" : "0", "errmsg" : "" } 返回状态码为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的示例 PUT /v1/networkservice/hierarchy-template/template-groups/members/fbde1c5d-5b94-49e3-a912-48641015e45c/properties 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 { "bindingName" : "binding1", "deviceRoles" : ["Gateway","CORE"], "deviceTypes" : ["AP","LSW"], "deviceModels" : ["S12700E-4","S12700E-12"], "deviceNameContains" : "device1" }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 replaceOriginalDeviceDto 是 REFERENCE 详细请参见表2。 设备替换入参模型。 - 表2 ReplaceOriginalDeviceDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 originalDeviceId 是 UUID 0~64个字符。 - 待替换设备的ID。 "00000000-0000-0000-0000-000000000001" newEsn 是 string 0~64个字符。 - 该字段必填。newEsn字段合法则替换原有esn,newEsn字段不合法将originalDeviceId对应的设备esn置空。 "2102351BTJ0000000666" newDeviceModel 否 string 0~64个字符。 - 替换设备的新款型,替换前后设备款型必须一致(交换机除外),对于交换机需要设备的款型为同一系列下的设备款型。 "S8700-6"
  • 响应示例 返回状态码为200:设备替换成功,响应体参考CommonResponseBean。 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" : "" } 返回状态码为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的示例 POST /controller/campus/v3/devices/replacement 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 { "originalDeviceId" : "00000000-0000-0000-0000-000000000001", "newEsn" : "2102351BTJ0000000666", "newDeviceModel" : "S8700-6" }
  • 请求示例 HTTP的示例 GET /controller/campus/v1/networkservice/networkconfig/interface?deviceId=00000000-0000-0000-0000-000000000000&interfaceName=GigabitEthernet0/0/0 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:查询成功,响应体参考DeviceInterfaceResponse。 表2 DeviceInterfaceResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码0表示成功,否则为失败。 "0" errmsg string 0~512个字符。 - 错误信息。 "" data REFERENCE 详细请参见表3。 打开或关闭设备接口返回实体。 - 表3 DeviceInterfaceResponseVo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 deviceId string 0~64个字符。 - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" interfaceName string 0~64个字符。 - 设备接口名称。 "GigabitEthernet0/0/0" status string shutdown undo shutdown initial - 设备接口状态。 shutdown:设备接口关闭。 undo shutdown:设备接口打开。 initial:表示这个接口之前没有执行过shutdown或undo shutdown。 "shutdown" 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部服务器错误。 详细信息请参见实际响应消息体。
  • URI /controller/campus/v1/networkservice/networkconfig/interface 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 0~64个字符。 - 设备ID,UUID格式。 "00000000-0000-0000-0000-000000000000" interfaceName 是 string 0~128个字符。 - 接口名称,比如GigabitEthernet0/0/0。 "GigabitEthernet0/0/0"
  • 响应示例 返回状态码为200:查询成功,响应体参考DeviceInterfaceResponse。 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" : { "deviceId" : "00000000-0000-0000-0000-000000000000", "interfaceName" : "GigabitEthernet0/0/0", "status" : "shutdown" } } 返回状态码为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
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 body 是 REFERENCE 详细请参见表3。 CLI配置ID列表,结构体参见DeletePersonalizedCLIDto。 - 表3 DeletePersonalizedCLIDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 cliList 是 ARRAY_REFERENCE 1-100个列表项,详细请参见表4。 CLI配置ID列表,结构体参见DeletePersonalizedCli。 - 表4 DeletePersonalizedCli对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 32个字符。 - CLI配置ID。 "04f680e9ac0f4e298f27e4742f069af3" deviceId 是 string - - 设备id,UUID格式。 "026af5f1-e57c-4cc8-99f7-3d52faf4dd7a"
  • 请求示例 HTTP的示例 POST /controller/campus/v1/networkservice/networkconfig/net/cli/sites/fbb684c8-0d37-496f-bafa-4b06d5151e2e/type/AP/cliproxy/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 { "cliList" : [ { "id" : "04f680e9ac0f4e298f27e4742f069af3", "deviceId" : "026af5f1-e57c-4cc8-99f7-3d52faf4dd7a" } ] }
  • 响应参数 返回状态码为200:成功删除CLI配置信息,返回结构体参见DeletePersonalizedCliResponse。 表5 DeletePersonalizedCliResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data ARRAY_REFERENCE 0-100个列表项,详细请参见表6。 删除成功的CLI列表,结构体参见DeletePersonalizedCli。 - 表6 DeletePersonalizedCli对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id string 32个字符。 - CLI配置ID。 "04f680e9ac0f4e298f27e4742f069af3" deviceId string - - 设备id,UUID格式。 "026af5f1-e57c-4cc8-99f7-3d52faf4dd7a" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部服务错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:成功删除CLI配置信息,返回结构体参见DeletePersonalizedCliResponse。 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" : [ { "id" : "04f680e9ac0f4e298f27e4742f069af3", "deviceId" : "026af5f1-e57c-4cc8-99f7-3d52faf4dd7a" } ] } 返回状态码为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 /controller/campus/v1/networkservice/networkconfig/net/cli/sites/{siteId}/type/{deviceType}/cliproxy/batch-delete 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 是 string - - 站点ID, UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" deviceType 是 string - - 设备类型,取值范围:AP、LSW、FW、AR。 "AP"
  • 响应示例 返回状态码为200:更新站点标签成功,响应体参考SitesTagResponse。 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" : { "tag" : "tagHub", "siteIds" : ["a99f794e-b510-438c-a75d-de59f02347eb"] } } 返回状态码为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的示例 PUT /controller/campus/v1/sdwan/net/sites/tag 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 { "tag" : "tagHub", "siteIds" : ["a99f794e-b510-438c-a75d-de59f02347eb"] }
  • 响应示例 返回状态码为200:删除成功,响应体参考NatResponse。 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" : { "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 } ] } ] } }
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/policy/traffic/nat/dynamicnat-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 { "vpnId" : "00000000-0000-0000-0000-000000000000", "siteId" : "00000000-0000-0000-0000-000000000000", "policyIds" : ["00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000001"] }
  • 请求示例 HTTP的示例 PUT /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-nat-address-group:snat-address-group 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" : [ { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "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,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
  • 请求参数 表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地址池。 - 表4 nes-ne-snat-address-group-augment对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-nat-address-group:snat-address-group 否 ARRAY_REFERENCE 详细请参见表5。 源NAT地址池。 - 表5 nes-ne-snat-address-group对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 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" name 否 string 1~34个字符。 - 源NAT地址池名称,单一主键字段。 "name" mode 否 string pat no-pat full-cone pat NAT模式。 "full-cone" mode-pattern 否 REFERENCE 详细请参见表6。 NAT模式扩展。AR6700V-L款型不支持。 - sections 否 REFERENCE 详细请参见表7。 地址段。 - vrid 否 int64 [1-255] - VRRP备份组号。AR6700V-L款型不支持。 6 port-block 否 REFERENCE 详细请参见表9。 端口预分配。AR6700V-L款型不支持。 - 表6 mode-pattern对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 reverse-enable 否 boolean true false true Servermap反向。 true address-zone 否 string global local - 安全域。 "global" 表7 sections对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 section 否 ARRAY_REFERENCE 详细请参见表8。 地址段列表。 - 表8 sections-section对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 section-id 否 int32 [0-65535] - 地址段ID,单一主键字段。 5 start-ip 是 string - - 起始IP地址。 "192.168.1.2" end-ip 是 string - - 结束IP地址。 "192.168.1.5" 表9 port-block对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 size 否 int32 [8-16384] - 预分配端口块大小。 10 extended-times 否 int32 [1-3] - 增量分配的次数。 1 start-port 否 int32 [0-65535] - 起始端口。 1000 end-port 否 int32 [0-65535] - 结束端口。 1100
共100000条
提示

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