-
请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 body 是 REFERENCE 详细请参见表3。 修改交换机防攻击策略配置参数体。 - 表3 DefendPolicyDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 whitelist 是 ARRAY_REFERENCE 1个列表项,详细请参见表4。 交换机防攻击策略白名单列表。 - id 是 string 32个字符。 - 防攻击策略id "fbb684c80d37406fbafa4b06d6151e2e"
-
响应示例 返回状态码为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" : {
"whitelist" : [
{
"aclConfigType" : "Custom",
"aclProfileId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"customAclRuleList" : [
{
"ruleId" : 1,
"policy" : "permit",
"protocol" : "tcp",
"srcIp" : "192.168.1.0/24",
"srcPort" : "23",
"dstIp" : "192.168.2.0/24",
"dstPort" : "24",
"description" : "Rule1"
}
]
}
],
"id" : "fbb684c80d37406fbafa4b06d6151e2e"
}
} 返回状态码为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/api/v1/networkconfig/lswdefendpolicy/devices/{deviceId}/defendpolicy 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备ID。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
-
请求示例 HTTP的示例 PUT /controller/campus/api/v1/networkconfig/lswdefendpolicy/devices/fbb684c8-0d37-496f-bafa-4b06d5151e2e/defendpolicy 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
{
"whitelist" : [
{
"aclConfigType" : "Custom",
"aclProfileId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"customAclRuleList" : [
{
"ruleId" : 1,
"policy" : "permit",
"protocol" : "tcp",
"srcIp" : "192.168.1.0/24",
"srcPort" : "23",
"dstIp" : "192.168.2.0/24",
"dstPort" : "24",
"description" : "Rule1"
}
]
}
],
"id" : "fbb684c80d37406fbafa4b06d6151e2e"
}
-
请求示例 HTTP的示例 GET /controller/campus/api/v1/networkconfig/lswdefendpolicy/devices/fbb684c8-0d37-496f-bafa-4b06d6151e2e/defendpolicy 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/api/v1/networkconfig/lswdefendpolicy/devices/{deviceId}/defendpolicy 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 是 string 36个字符。 - 设备ID。 "fbb684c8-0d37-496f-bafa-4b06d6151e2e"
-
响应参数 返回状态码为200:查询成功。 表2 GetDefendPolicyResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" data REFERENCE 详细请参见表3。 防攻击策略列表 - 表3 DefendPolicyListDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 defendPolicies ARRAY_REFERENCE 0-1个列表项,详细请参见表7。 查询交换机防攻击策略配置数据列表。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为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" : "",
"data" : {
"defendPolicies" : [
{
"whitelist" : [
{
"aclConfigType" : "Custom",
"aclProfileId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e",
"customAclRuleList" : [
{
"ruleId" : 1,
"policy" : "permit",
"protocol" : "tcp",
"srcIp" : "192.168.1.0/24",
"srcPort" : "23",
"dstIp" : "192.168.2.0/24",
"dstPort" : "24",
"description" : "Rule1"
}
]
}
],
"id" : "fbb684c80d37406fbafa4b06d6151e2e"
}
]
}
} 返回状态码为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