Files
pyGoEdge-UserPanel/reference/goedge 文档/HTTPFirewallRuleGroupService.md
2025-11-18 03:36:49 +08:00

259 lines
5.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HTTPFirewallRuleGroupService
> WAF分组服务
---
## addHTTPFirewallRuleGroupSet
> 添加规则集
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleGroupService/addHTTPFirewallRuleGroupSet`
- RPC`rpc addHTTPFirewallRuleGroupSet(AddHTTPFirewallRuleGroupSetRequest) returns (RPCSuccess);`
**请求对象 (`AddHTTPFirewallRuleGroupSetRequest`)**
```json
{
"firewallRuleGroupId": "int64",
"firewallRuleSetConfigJSON": "bytes"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleGroupService/addHTTPFirewallRuleGroupSet" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## createHTTPFirewallRuleGroup
> 创建分组
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleGroupService/createHTTPFirewallRuleGroup`
- RPC`rpc createHTTPFirewallRuleGroup (CreateHTTPFirewallRuleGroupRequest) returns (CreateHTTPFirewallRuleGroupResponse);`
**请求对象 (`CreateHTTPFirewallRuleGroupRequest`)**
```json
{
"isOn": "bool // 是否启用",
"name": "string // 名称",
"code": "string",
"description": "string // 描述(备注)"
}
```
**响应对象 (`CreateHTTPFirewallRuleGroupResponse`)**
```json
{
"firewallRuleGroupId": "int64"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleGroupService/createHTTPFirewallRuleGroup" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## findEnabledHTTPFirewallRuleGroup
> 获取分组信息
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleGroupService/findEnabledHTTPFirewallRuleGroup`
- RPC`rpc findEnabledHTTPFirewallRuleGroup (FindEnabledHTTPFirewallRuleGroupRequest) returns (FindEnabledHTTPFirewallRuleGroupResponse);`
**请求对象 (`FindEnabledHTTPFirewallRuleGroupRequest`)**
```json
{
"firewallRuleGroupId": "int64"
}
```
**响应对象 (`FindEnabledHTTPFirewallRuleGroupResponse`)**
```json
{
"firewallRuleGroup": "HTTPFirewallRuleGroup"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleGroupService/findEnabledHTTPFirewallRuleGroup" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## findEnabledHTTPFirewallRuleGroupConfig
> 获取分组配置
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleGroupService/findEnabledHTTPFirewallRuleGroupConfig`
- RPC`rpc findEnabledHTTPFirewallRuleGroupConfig (FindEnabledHTTPFirewallRuleGroupConfigRequest) returns (FindEnabledHTTPFirewallRuleGroupConfigResponse);`
**请求对象 (`FindEnabledHTTPFirewallRuleGroupConfigRequest`)**
```json
{
"firewallRuleGroupId": "int64"
}
```
**响应对象 (`FindEnabledHTTPFirewallRuleGroupConfigResponse`)**
```json
{
"firewallRuleGroupJSON": "bytes"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleGroupService/findEnabledHTTPFirewallRuleGroupConfig" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## updateHTTPFirewallRuleGroup
> 修改分组
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleGroupService/updateHTTPFirewallRuleGroup`
- RPC`rpc updateHTTPFirewallRuleGroup (UpdateHTTPFirewallRuleGroupRequest) returns (RPCSuccess);`
**请求对象 (`UpdateHTTPFirewallRuleGroupRequest`)**
```json
{
"firewallRuleGroupId": "int64",
"isOn": "bool // 是否启用",
"name": "string // 名称",
"description": "string // 描述(备注)",
"code": "string"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleGroupService/updateHTTPFirewallRuleGroup" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## updateHTTPFirewallRuleGroupIsOn
> 设置是否启用分组
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleGroupService/updateHTTPFirewallRuleGroupIsOn`
- RPC`rpc updateHTTPFirewallRuleGroupIsOn (UpdateHTTPFirewallRuleGroupIsOnRequest) returns (RPCSuccess);`
**请求对象 (`UpdateHTTPFirewallRuleGroupIsOnRequest`)**
```json
{
"firewallRuleGroupId": "int64",
"isOn": "bool // 是否启用"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleGroupService/updateHTTPFirewallRuleGroupIsOn" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## updateHTTPFirewallRuleGroupSets
> 修改分组的规则集
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleGroupService/updateHTTPFirewallRuleGroupSets`
- RPC`rpc updateHTTPFirewallRuleGroupSets (UpdateHTTPFirewallRuleGroupSetsRequest) returns (RPCSuccess);`
**请求对象 (`UpdateHTTPFirewallRuleGroupSetsRequest`)**
```json
{
"firewallRuleGroupId": "int64",
"firewallRuleSetsJSON": "bytes"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleGroupService/updateHTTPFirewallRuleGroupSets" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---