云服务器内容精选

  • 响应示例 返回状态码为200:修改的防火墙设备NAT配置。 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" : { "name" : "nat1", "description" : "", "conversionMode" : 3, "destinationMode" : "address-to-address", "sourceZones" : [ "00000000-0000-0000-0000-000000000001" ], "destinationZones" : [ "00000000-0000-0000-0000-000000000003" ], "oldSourceIp" : "10.2.0.6/24", "oldDestinationIp" : "10.1.1.10", "sourceConvert" : 1, "newSourceIpGroup" : [ "10.1.1.10" ], "newDestinationIpGroup" : [ "10.1.1.10" ], "destinationPort" : "80,82-98", "serviceList" : [ { "serviceType" : "tcp", "sourcePort" : "80", "destPort" : "80-97" } ], "id" : "de5813f8ff1e41f5ba9c324da70b49ed", "priority" : 5 } } 返回状态码为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/fwnat/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/fwnat 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 { "name" : "nat1", "description" : "", "conversionMode" : 3, "destinationMode" : "address-to-address", "sourceZones" : [ "00000000-0000-0000-0000-000000000001" ], "destinationZones" : [ "00000000-0000-0000-0000-000000000003" ], "oldSourceIp" : "10.2.0.6/24", "oldDestinationIp" : "10.1.1.10", "sourceConvert" : 1, "newSourceIpGroup" : [ "10.1.1.10" ], "newDestinationIpGroup" : [ "10.1.1.10" ], "destinationPort" : "80,82-98", "serviceList" : [ { "serviceType" : "tcp", "sourcePort" : "80", "destPort" : "80-97" } ], "id" : "de5813f8ff1e41f5ba9c324da70b49ed", "priority" : 5 }
  • URI /controller/campus/v1/networkservice/networkconfig/net/fwnat/devices/{deviceId}/fwnat 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
  • 响应示例 返回状态码为201:创建的防火墙设备NAT配置。 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" : { "name" : "nat1", "description" : "", "conversionMode" : 3, "destinationMode" : "address-to-address", "sourceZones" : [ "00000000-0000-0000-0000-000000000001" ], "destinationZones" : [ "00000000-0000-0000-0000-000000000003" ], "oldSourceIp" : "10.2.0.6/24", "oldDestinationIp" : "10.1.1.10", "sourceConvert" : 1, "newSourceIpGroup" : [ "10.1.1.10" ], "newDestinationIpGroup" : [ "10.1.1.10" ], "destinationPort" : "80,82-98", "serviceList" : [ { "serviceType" : "tcp", "sourcePort" : "80", "destPort" : "80-97" } ], "id" : "de5813f8ff1e41f5ba9c324da70b49ed", "priority" : 5 } } 返回状态码为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/fwnat/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/fwnat 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" : "nat1", "description" : "", "conversionMode" : 3, "destinationMode" : "address-to-address", "sourceZones" : [ "00000000-0000-0000-0000-000000000001" ], "destinationZones" : [ "00000000-0000-0000-0000-000000000003" ], "oldSourceIp" : "10.2.0.6/24", "oldDestinationIp" : "10.1.1.10", "sourceConvert" : 1, "newSourceIpGroup" : [ "10.1.1.10" ], "newDestinationIpGroup" : [ "10.1.1.10" ], "destinationPort" : "80,82-98", "serviceList" : [ { "serviceType" : "tcp", "sourcePort" : "80", "destPort" : "80-97" } ] }
  • URI /controller/campus/v1/networkservice/networkconfig/net/fwnat/devices/{deviceId}/fwnat 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
  • URI /controller/campus/v1/networkservice/networkconfig/net/fwnat/devices/{deviceId}/fwnat 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" 表2 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 pageIndex 否 integer [1-65535] - 页面索引。 1 pageSize 否 integer [1-1000] - 每页显示记录数。 20
  • 请求示例 HTTP的示例 GET /controller/campus/v1/networkservice/networkconfig/net/fwnat/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/fwnat?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
  • 响应参数 返回状态码为200:查询的防火墙设备NAT配置。 表3 GetFwNatResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" data REFERENCE 详细请参见表4。 - - 表4 FwNatInfoDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 pageIndex integer [1-65535] - 页面索引。 1 pageSize integer [1-1000] - 每页显示记录数。 20 totalRecords integer [1-65535] - 总记录数。 10 deviceNatPolicys ARRAY_REFERENCE 0-100个列表项,详细请参见表6。 防火墙设备NAT配置信息。 - 返回状态码为400:校验失败信息。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:查询的防火墙设备NAT配置。 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, "deviceNatPolicys" : [ { "name" : "nat1", "description" : "", "conversionMode" : 3, "destinationMode" : "address-to-address", "sourceZones" : [ "00000000-0000-0000-0000-000000000001" ], "destinationZones" : [ "00000000-0000-0000-0000-000000000003" ], "oldSourceIp" : "10.2.0.6/24", "oldDestinationIp" : "10.1.1.10", "sourceConvert" : 1, "newSourceIpGroup" : [ "10.1.1.10" ], "newDestinationIpGroup" : [ "10.1.1.10" ], "destinationPort" : "80,82-98", "serviceList" : [ { "serviceType" : "tcp", "sourcePort" : "80", "destPort" : "80-97" } ], "id" : "de5813f8ff1e41f5ba9c324da70b49ed", "priority" : 5 } ] } } 返回状态码为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:删除防火墙设备NAT配置成功。 HTTP/1.1 200 OK Date: Sun,20 Jan 2019 10:00:00 GMT Server: example-server Content-Type: application/json { "errcode" : "0", "errmsg" : "", "success" : [{ "id" : "de5813f8ff1e41f5ba9c324da70b49ed", "name" : "nat1" }], "fail" : null } 返回状态码为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
  • URI /controller/campus/v1/networkservice/networkconfig/net/fwnat/devices/{deviceId}/fwnat/action/batch-delete 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备标识,UUID格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
  • 请求示例 HTTP的示例 POST /controller/campus/v1/networkservice/networkconfig/net/fwnat/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/fwnat/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" ] }
  • 响应参数 返回状态码为200:删除防火墙设备NAT配置成功。 表4 FwNatDeleteResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" success ARRAY_REFERENCE 0-64个列表项,详细请参见表5。 删除成功的防火墙设备NAT配置。 - fail REFERENCE 详细请参见表6。 - - 表5 DeleteFwNatInfoDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id string 0~32个字符。 - NAT策略id。 - name string 0~128个字符。 - 名称。 - 表6 FwNatDeleteResponseFailDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0x00c80014" errmsg string 0~256个字符。 - 错误信息。 "The id does not exist." data REFERENCE - - - - 表7 DeleteFwNatInfoDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id string 0~32个字符。 - NAT策略id。 - name string 0~128个字符。 - 名称。 - 返回状态码为400:校验失败信息。 详细信息请参见实际响应消息体。