云服务器内容精选

  • 响应示例 返回状态码为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
  • 请求示例 HTTP的示例 PUT /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-AC CES S-TOKEN: x-yyyyyy restconf-transaction-id: "00000000-0000-0000-0000-000000000000" { "huawei-nce-e-static-routing-ipv4:static-routing-ipv4" : [ { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "destination-prefix" : "10.1.1.0/24", "vpn-instance" : "vpn1", "next-hop-type" : "Ip", "next-hop-addresses" : [ { "address" : "10.1.1.1", "preference" : 10, "track-setting" : "nqa", "nqa" : "test", "bfd-enable" : true } ], "next-hop-interfaces" : [ { "interface" : "GE0/0/1", "preference" : 10, "dhcp-enable" : true, "track-setting" : "nqa", "nqa" : "test" } ], "next-hop-interface-addresses" : [ { "address" : "10.1.1.1", "interface" : "GE0/0/1", "preference" : 10, "track-setting" : "nqa", "nqa" : "test", "bfd-enable" : true } ] } ] }
  • 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"
  • 请求参数 表2 header参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 restconf-transaction-id 是 string - - 事务ID。 "00000000-0000-0000-0000-000000000000" 表3 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-static-routing-ipv4:static-routing-ipv4 是 REFERENCE 详细请参见表4。 IPv4静态路由配置参数。 -
  • 响应示例 返回状态码为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
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-static-routing-ipv4:static-routing-ipv4/{destination-prefix}/{vpn-instance}/{next-hop-type} 表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" destination-prefix 是 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])/(([0-9])|([1-2][0-9])|(3[0-2]))。 - IPv4目的网段/掩码,联合主键字段。 "10.1.1.0/24" vpn-instance 是 string 1~31个字符。 - VPN,联合主键字段。 "vpn1" next-hop-type 是 string Ip Interface IpInterface black_hole - 下一跳类型,联合主键字段。 "Ip"
  • 请求示例 HTTP的示例 PATCH /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-static-routing-ipv4:static-routing-ipv4/10.1.1.0%2F24/vpn1/Ip 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-static-routing-ipv4:static-routing-ipv4" : { "destination-prefix" : "10.1.1.0/24", "vpn-instance" : "vpn1", "next-hop-type" : "Ip", "next-hop-addresses" : [ { "address" : "10.1.1.1", "preference" : 10, "track-setting" : "nqa", "nqa" : "test", "bfd-enable" : true } ], "next-hop-interfaces" : [ { "interface" : "GE0/0/1", "preference" : 10, "dhcp-enable" : true, "track-setting" : "nqa", "nqa" : "test" } ], "next-hop-interface-addresses" : [ { "address" : "10.1.1.1", "interface" : "GE0/0/1", "preference" : 10, "track-setting" : "nqa", "nqa" : "test", "bfd-enable" : true } ] } }
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/sdwan/routing-protocol/static 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 { "routes" : [ { "id" : "a99f794e-b510-438c-a75d-de59f02347eb", "vpnId" : "a99f794e-b510-438c-a75d-de59f02347eb", "siteId" : "a99f794e-b510-438c-a75d-de59f02347eb", "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "tnpId" : "a99f794e-b510-438c-a75d-de59f02347eb", "priority" : 1, "destinationAddressMask" : "10.1.0.0/16", "nextHopType" : "ip-address", "ipAddress" : "10.1.1.1", "track" : true, "target" : "10.1.0.0", "configSource" : "Wan", "isDefaultVpn" : false, "outBoundInterface" : "Tunnel0/0/400", "outBoundInterfaceDisplayName" : "GE0/0/2", "outBoundInterfaceType" : "IPSec" } ] }
  • 响应示例 返回状态码为200:接口调用成功,响应体参考StaticRouteResponse。 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" : "a99f794e-b510-438c-a75d-de59f02347eb", "vpnId" : "a99f794e-b510-438c-a75d-de59f02347eb", "siteId" : "a99f794e-b510-438c-a75d-de59f02347eb", "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "tnpId" : "a99f794e-b510-438c-a75d-de59f02347eb", "priority" : 1, "destinationAddressMask" : "10.1.0.0/16", "nextHopType" : "ip-address", "ipAddress" : "10.1.1.1", "track" : true, "target" : "10.1.0.0", "configSource" : "Wan", "isDefaultVpn" : false, "outBoundInterface" : "Tunnel0/0/400", "outBoundInterfaceDisplayName" : "GE0/0/2", "outBoundInterfaceType" : "IPSec" } ], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : { "id" : "a99f794e-b510-438c-a75d-de59f02347eb", "vpnId" : "a99f794e-b510-438c-a75d-de59f02347eb", "siteId" : "a99f794e-b510-438c-a75d-de59f02347eb", "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "tnpId" : "a99f794e-b510-438c-a75d-de59f02347eb", "priority" : 1, "destinationAddressMask" : "10.1.0.0/16", "nextHopType" : "ip-address", "ipAddress" : "10.1.1.1", "track" : true, "target" : "10.1.0.0", "configSource" : "Wan", "isDefaultVpn" : false, "outBoundInterface" : "Tunnel0/0/400", "outBoundInterfaceDisplayName" : "GE0/0/2", "outBoundInterfaceType" : "IPSec" } } ] } 返回状态码为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
  • 响应示例 返回状态码为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" : { "pageIndex" : 1, "pageSize" : 20, "totalRecords" : 10, "deviceFwStaticRoutePolicys" : [ { "mask" : 22, "destinationPrefixIp" : "10.20.0.0", "nextHopAddress" : "10.20.0.10", "nextInterface" : "GigabitEthernet0/0/4", "trackIplinkId" : "ae5813f8ff1e41f5ba9c324da70b49ca", "preference" : 5, "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
  • 响应参数 返回状态码为200:查询的防火墙设备静态路由配置。 表3 GetFwStaticRouteResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" data REFERENCE 详细请参见表4。 - - 表4 FwStaticRouteInfoDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 pageIndex integer [1-65535] - 页面索引。 1 pageSize integer [1-1000] - 每页显示记录数。 20 totalRecords integer [1-65535] - 总记录数。 10 deviceFwStaticRoutePolicys ARRAY_REFERENCE 0-100个列表项,详细请参见表5。 防火墙设备静态路由配置信息。 - 返回状态码为400:校验失败信息。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 GET /controller/campus/v1/networkservice/networkconfig/net/fwstaticroute/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/staticroute?pageIndex=1&pageSize=20 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
  • URI /controller/campus/v1/networkservice/networkconfig/net/fwstaticroute/devices/{deviceId}/staticroute 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" 表2 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 pageIndex 是 integer [1-65535] - 页面索引。 1 pageSize 是 integer [1-1000] - 每页显示记录数。 20
  • 响应示例 返回状态码为201:接口调用成功,响应体参考StaticRouteResponse。 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" : "", "success" : [ { "id" : "a99f794e-b510-438c-a75d-de59f02347eb", "vpnId" : "a99f794e-b510-438c-a75d-de59f02347eb", "siteId" : "a99f794e-b510-438c-a75d-de59f02347eb", "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "tnpId" : "a99f794e-b510-438c-a75d-de59f02347eb", "priority" : 1, "destinationAddressMask" : "10.1.0.0/16", "nextHopType" : "ip-address", "ipAddress" : "10.1.1.1", "track" : true, "target" : "10.1.0.0", "configSource" : "Wan", "isDefaultVpn" : false, "outBoundInterface" : "Tunnel0/0/400", "outBoundInterfaceDisplayName" : "GE0/0/2", "outBoundInterfaceType" : "IPSec" } ], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : { "id" : "a99f794e-b510-438c-a75d-de59f02347eb", "vpnId" : "a99f794e-b510-438c-a75d-de59f02347eb", "siteId" : "a99f794e-b510-438c-a75d-de59f02347eb", "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "tnpId" : "a99f794e-b510-438c-a75d-de59f02347eb", "priority" : 1, "destinationAddressMask" : "10.1.0.0/16", "nextHopType" : "ip-address", "ipAddress" : "10.1.1.1", "track" : true, "target" : "10.1.0.0", "configSource" : "Wan", "isDefaultVpn" : false, "outBoundInterface" : "Tunnel0/0/400", "outBoundInterfaceDisplayName" : "GE0/0/2", "outBoundInterfaceType" : "IPSec" } } ] } 返回状态码为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
  • 响应参数 返回状态码为201:接口调用成功,响应体参考StaticRouteResponse。 表4 StaticRouteResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" success ARRAY_REFERENCE 0-128个列表项,详细请参见表5。 静态路由信息。 - fail ARRAY_REFERENCE 0-128个列表项,详细请参见表6。 创建或者更新失败的静态路由信息。 - 表5 StaticRouteInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id uuid - - 静态路由资源ID,UUID格式。更新、删除时必填。 "a99f794e-b510-438c-a75d-de59f02347eb" vpnId uuid - - 静态路由所在VPN ID,UUID格式。创建overlay 静态路由时必填。 "a99f794e-b510-438c-a75d-de59f02347eb" siteId uuid - - 静态路由所在站点ID,UUID格式。创建、删除时必填。 "a99f794e-b510-438c-a75d-de59f02347eb" deviceId uuid - - 静态路由所在设备ID,UUID格式。创建时必填。 "a99f794e-b510-438c-a75d-de59f02347eb" tnpId uuid - - 传输网络端口ID,UUID格式。创建underlay 静态路由时必填。 "a99f794e-b510-438c-a75d-de59f02347eb" priority int32 [1-255] - 静态路由优先级。创建时必填。 1 destinationAddressMask string 0~32个字符。 - 目的网段/掩码。创建时必填。配置后不支持修改。 "10.1.0.0/16" nextHopType string 10~18个字符。 - 下一跳类型,取值范围:ip-address、outbound-interface、black-hole。创建时必填。创建underlay 静态路由,tnp为静态模式时,下一跳类型不能配置为outbound-interface。配置后不支持修改。 "ip-address" ipAddress string 0~32个字符。 - IP地址,nextHopType为ip-address时,该字段必填。配置后不支持修改。 "10.1.1.1" track boolean true false false 是否开启NQA探测,默认false。 true target string 0~32个字符。 - 探测IP地址,track为true时,该字段必填。只有在track字段为true时,target字段才生效。 "10.1.0.0" configSource string 0~32个字符。 - 配置源信息,用于区分是WAN业务还是LanWan互联业务,仅查询接口使用,不能修改,取值范围:Wan、LanWan。 "Wan" isDefaultVpn boolean true false - 是否属于公网VPN,当值为true时,VPNID和TNPID必须为空。 false outBoundInterface string - - 静态路由出接口。非公网VPN的静态路由出接口,该字段当前只支持Tunnel口。 "Tunnel0/0/400" outBoundInterfaceDisplayName string - - 静态路由出接口,用于页面显示。 "GE0/0/2" outBoundInterfaceType string - - 静态路由出接口类型,对于OVERLAY静态路由,取值范围可以为:IPSec、Interworking Link。 "IPSec" 表6 FailStaticRouteInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表5。 静态路由信息。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。