云服务器内容精选

  • 响应示例 返回状态码为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" : { "pageIndex" : 1, "pageSize" : 20, "totalRecords" : 10, "subnetList" : [ { "name" : "subnet1", "vlanId" : 100, "ipv4poolOrNot" : 0, "ipAddress" : "192.168.12.12", "maskAddress" : 24, "subIpList" : [ { "subIpAddress" : "192.168.13.13", "subMaskAddress" : 24 } ], "arpEnable" : false, "mtu" : 1500, "dhcpEnable" : true, "icmpRedirectSendEnable" : true, "dhcpConfig" : { "dhcpMode" : "server", "relayServerIps" : [ "10.122.12.1" ], "dhcpServerConfig" : { "dnsConfig" : { "dnsServerMode" : "custom", "priorDnsServer" : "10.15.15.15", "standbyDnsServer" : "10.15.15.16" }, "domainSuffix" : "com", "manegeNetworkEnable" : true, "exceptFitAp" : "CloudAP", "option148" : false, "acAddressType" : "IP", "option43" : false, "wacAddress" : [ "10.122.12.1" ], "dhcpServerLogging" : false, "dhcpServerOptions" : [ { "code" : 26, "subCode" : 5, "optionType" : "hex", "optionValue" : "2e" } ], "leasesConfig" : { "unlimit" : false, "day" : 1, "hour" : 0, "minute" : 0 }, "excludedAddresses" : [ { "startIpAddress" : "192.168.12.13", "endIpAddress" : "192.168.12.13" } ], "fixIpEnable" : false, "fixedIpRange" : [ { "startIpAddress" : "192.168.12.13", "endIpAddress" : "192.168.12.13" } ], "staticBindings" : [ { "staticIpAddress" : "192.168.12.14", "staticMacAddress" : "XX:XX:XX:XX:XX:XX" } ] } }, "id" : "30a51c112787470f81045d60ccf3995f" } ] } } 返回状态码为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
  • URI /controller/campus/v1/networkservice/networkconfig/net/lswsubnet/devices/{deviceId}/subnet 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string - - 设备ID,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" 表2 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 pageIndex 是 integer [1-4096] - 页面索引,支持子网列表分页。 1 pageSize 是 integer [1-1000] - 每页显示记录数,支持子网列表分页。 20
  • 响应参数 返回状态码为200:查询成功,返回设备所有子网配置信息。 表3 GetSubnetInfoResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" data REFERENCE 详细请参见表4。 - - 表4 GetSubnetInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 pageIndex integer [1-4096] - 页面索引。 1 pageSize integer [1-1000] - 每页显示记录数。 20 totalRecords integer [1-4096] - 总记录数。 10 subnetList ARRAY_REFERENCE 0-1000个列表项,详细请参见表13。 - - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 GET /controller/campus/v1/networkservice/networkconfig/net/lswsubnet/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/subnet?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-AC CES S-TOKEN: x-yyyyyy
  • 请求示例 HTTP的示例 DELETE /controller/campus/v1/networkservice/networkconfig/net/lswsubnet/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/subnet/30a51c112787470f81045d60ccf3995f 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,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
  • URI /controller/campus/v1/networkservice/networkconfig/net/lswsubnet/devices/{deviceId}/subnet/{subnetId} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string - - 设备ID,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" subnetId 是 string - - 子网ID。 "30a51c112787470f81045d60ccf3995f"
  • 响应示例 返回状态码为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" : { "name" : "subnet1", "vlanId" : 100, "ipv4poolOrNot" : 0, "ipAddress" : "192.168.12.12", "maskAddress" : 24, "subIpList" : [ { "subIpAddress" : "192.168.13.13", "subMaskAddress" : 24 } ], "arpEnable" : false, "mtu" : 1500, "dhcpEnable" : true, "icmpRedirectSendEnable" : true, "dhcpConfig" : { "dhcpMode" : "server", "relayServerIps" : [ "10.122.12.1" ], "dhcpServerConfig" : { "dnsConfig" : { "dnsServerMode" : "custom", "priorDnsServer" : "10.15.15.15", "standbyDnsServer" : "10.15.15.16" }, "domainSuffix" : "com", "manegeNetworkEnable" : true, "exceptFitAp" : "CloudAP", "option148" : false, "acAddressType" : "IP", "option43" : false, "wacAddress" : [ "10.122.12.1" ], "dhcpServerLogging" : false, "dhcpServerOptions" : [ { "code" : 26, "subCode" : 5, "optionType" : "hex", "optionValue" : "2e" } ], "leasesConfig" : { "unlimit" : false, "day" : 1, "hour" : 0, "minute" : 0 }, "excludedAddresses" : [ { "startIpAddress" : "192.168.12.13", "endIpAddress" : "192.168.12.13" } ], "fixIpEnable" : false, "fixedIpRange" : [ { "startIpAddress" : "192.168.12.13", "endIpAddress" : "192.168.12.13" } ], "staticBindings" : [ { "staticIpAddress" : "192.168.12.14", "staticMacAddress" : "XX:XX:XX:XX:XX:XX" } ] } }, "id" : "30a51c112787470f81045d60ccf3995f" } } 返回状态码为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
  • URI /controller/campus/v1/networkservice/networkconfig/net/lswsubnet/devices/{deviceId}/subnet 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string - - 设备ID,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
  • 请求示例 HTTP的示例 POST /controller/campus/v1/networkservice/networkconfig/net/lswsubnet/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/subnet 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 { "name" : "subnet1", "vlanId" : 100, "ipv4poolOrNot" : 0, "ipAddress" : "192.168.12.12", "maskAddress" : 24, "subIpList" : [ { "subIpAddress" : "192.168.13.13", "subMaskAddress" : 24 } ], "arpEnable" : false, "mtu" : 1500, "dhcpEnable" : true, "icmpRedirectSendEnable" : true, "dhcpConfig" : { "dhcpMode" : "server", "relayServerIps" : [ "10.122.12.1" ], "dhcpServerConfig" : { "dnsConfig" : { "dnsServerMode" : "custom", "priorDnsServer" : "10.15.15.15", "standbyDnsServer" : "10.15.15.16" }, "domainSuffix" : "com", "manegeNetworkEnable" : true, "exceptFitAp" : "CloudAP", "option148" : false, "acAddressType" : "IP", "option43" : false, "wacAddress" : [ "10.122.12.1" ], "dhcpServerLogging" : false, "dhcpServerOptions" : [ { "code" : 26, "subCode" : 5, "optionType" : "hex", "optionValue" : "2e" } ], "leasesConfig" : { "unlimit" : false, "day" : 1, "hour" : 0, "minute" : 0 }, "excludedAddresses" : [ { "startIpAddress" : "192.168.12.13", "endIpAddress" : "192.168.12.13" } ], "fixIpEnable" : false, "fixedIpRange" : [ { "startIpAddress" : "192.168.12.13", "endIpAddress" : "192.168.12.13" } ], "staticBindings" : [ { "staticIpAddress" : "192.168.12.14", "staticMacAddress" : "XX:XX:XX:XX:XX:XX" } ] } } }
  • 响应示例 返回状态码为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" : { "name" : "subnet1", "vlanId" : 100, "ipv4poolOrNot" : 0, "ipAddress" : "192.168.12.12", "maskAddress" : 24, "subIpList" : [ { "subIpAddress" : "192.168.13.13", "subMaskAddress" : 24 } ], "arpEnable" : false, "mtu" : 1500, "dhcpEnable" : true, "icmpRedirectSendEnable" : true, "dhcpConfig" : { "dhcpMode" : "server", "relayServerIps" : [ "10.122.12.1" ], "dhcpServerConfig" : { "dnsConfig" : { "dnsServerMode" : "custom", "priorDnsServer" : "10.15.15.15", "standbyDnsServer" : "10.15.15.16" }, "domainSuffix" : "com", "manegeNetworkEnable" : true, "exceptFitAp" : "CloudAP", "option148" : false, "acAddressType" : "IP", "option43" : false, "wacAddress" : [ "10.122.12.1" ], "dhcpServerLogging" : false, "dhcpServerOptions" : [ { "code" : 26, "subCode" : 5, "optionType" : "hex", "optionValue" : "2e" } ], "leasesConfig" : { "unlimit" : false, "day" : 1, "hour" : 0, "minute" : 0 }, "excludedAddresses" : [ { "startIpAddress" : "192.168.12.13", "endIpAddress" : "192.168.12.13" } ], "fixIpEnable" : false, "fixedIpRange" : [ { "startIpAddress" : "192.168.12.13", "endIpAddress" : "192.168.12.13" } ], "staticBindings" : [ { "staticIpAddress" : "192.168.12.14", "staticMacAddress" : "XX:XX:XX:XX:XX:XX" } ] } }, "id" : "30a51c112787470f81045d60ccf3995f" } } 返回状态码为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
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/networkservice/networkconfig/net/lswsubnet/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/subnet 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 { "name" : "subnet1", "vlanId" : 100, "ipv4poolOrNot" : 0, "ipAddress" : "192.168.12.12", "maskAddress" : 24, "subIpList" : [ { "subIpAddress" : "192.168.13.13", "subMaskAddress" : 24 } ], "arpEnable" : false, "mtu" : 1500, "dhcpEnable" : true, "icmpRedirectSendEnable" : true, "dhcpConfig" : { "dhcpMode" : "server", "relayServerIps" : [ "10.122.12.1" ], "dhcpServerConfig" : { "dnsConfig" : { "dnsServerMode" : "custom", "priorDnsServer" : "10.15.15.15", "standbyDnsServer" : "10.15.15.16" }, "domainSuffix" : "com", "manegeNetworkEnable" : true, "exceptFitAp" : "CloudAP", "option148" : false, "acAddressType" : "IP", "option43" : false, "wacAddress" : [ "10.122.12.1" ], "dhcpServerLogging" : false, "dhcpServerOptions" : [ { "code" : 26, "subCode" : 5, "optionType" : "hex", "optionValue" : "2e" } ], "leasesConfig" : { "unlimit" : false, "day" : 1, "hour" : 0, "minute" : 0 }, "excludedAddresses" : [ { "startIpAddress" : "192.168.12.13", "endIpAddress" : "192.168.12.13" } ], "fixIpEnable" : false, "fixedIpRange" : [ { "startIpAddress" : "192.168.12.13", "endIpAddress" : "192.168.12.13" } ], "staticBindings" : [ { "staticIpAddress" : "192.168.12.14", "staticMacAddress" : "XX:XX:XX:XX:XX:XX" } ] } }, "id" : "30a51c112787470f81045d60ccf3995f" }
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 body 是 REFERENCE 详细请参见表3。 子网配置的参数体。 - 表3 SubnetDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 name 否 string 1~32个字符。 - 子网名称。1-32位英文字母、数字或特殊符号(特殊符号不包括问号“?” 和空格“ ”)。在同一交换机上,子网的name不能相同。 "subnet1" vlanId 否 integer [1-4094] - VLAN ID。1-4094之间的整数,建议VLAN ID不要配置和管理VLAN 相同,否则可能会导致设备脱管。在同一交换机上,子网的vlanId不能相同。vlanId不支持修改。 100 ipv4poolOrNot 否 integer [0-0] - IP获取方式。0:手动。 0 ipAddress 否 string 0~15个字符。 - 子网IP地址。必须是合法的单播IPV4地址,不允许是子网网段或0.0.0.0。当ipv4poolOrNot为0时,ipAddress必填。在同一交换机上,子网网段不能重叠。 "192.168.12.12" maskAddress 否 integer [1-30] - 子网掩码。当dhcpConfig.dhcpMode为server时,maskAddress要大于15。当ipv4poolOrNot为0时,maskAddress必填。 24 subIpList 否 ARRAY_REFERENCE 0-31个列表项,详细请参见表4。 子项IP列表,不能重复。 - arpEnable 否 boolean true false false ARP代理开关使能。 false mtu 否 integer [128-9216] 1500 MTU(接口的最大传输单元),取值为128-9216之间的整数。 1500 dhcpEnable 否 boolean true false true DHCP开关使能,当dhcpEnable为true时,dhcpConfig必填。 true icmpRedirectSendEnable 否 boolean true false true ICMP报文转发使能,默认为true。 true dhcpConfig 否 REFERENCE 详细请参见表5。 - - id 是 string 32个字符。 - 子网ID。 "30a51c112787470f81045d60ccf3995f"
  • URI /controller/campus/v1/networkservice/networkconfig/net/lswsubnet/devices/{deviceId}/subnet 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string - - 设备ID,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
提示

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