# NodeClusterFirewallActionService
> 防火墙动作服务

---

## countAllEnabledNodeClusterFirewallActions
> 计算动作数量

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterFirewallActionService/countAllEnabledNodeClusterFirewallActions`
- RPC：`rpc countAllEnabledNodeClusterFirewallActions (CountAllEnabledNodeClusterFirewallActionsRequest) returns (RPCCountResponse);`

**请求对象 (`CountAllEnabledNodeClusterFirewallActionsRequest`)**

```json
{
  "nodeClusterId": "int64 // 集群ID"
}
```

**响应对象 (`RPCCountResponse`)**

```json
{
  "count": "int64 // 数量"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterFirewallActionService/countAllEnabledNodeClusterFirewallActions" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## createNodeClusterFirewallAction
> 创建动作

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterFirewallActionService/createNodeClusterFirewallAction`
- RPC：`rpc createNodeClusterFirewallAction (CreateNodeClusterFirewallActionRequest) returns (NodeClusterFirewallActionResponse);`

**请求对象 (`CreateNodeClusterFirewallActionRequest`)**

```json
{
  "nodeClusterId": "int64 // 集群ID",
  "name": "string // 名称",
  "eventLevel": "string",
  "type": "string",
  "paramsJSON": "bytes"
}
```

**响应对象 (`NodeClusterFirewallActionResponse`)**

```json
{
  "nodeClusterFirewallActionId": "int64"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterFirewallActionService/createNodeClusterFirewallAction" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## deleteNodeClusterFirewallAction
> 删除动作

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterFirewallActionService/deleteNodeClusterFirewallAction`
- RPC：`rpc deleteNodeClusterFirewallAction (DeleteNodeClusterFirewallActionRequest) returns (RPCSuccess);`

**请求对象 (`DeleteNodeClusterFirewallActionRequest`)**

```json
{
  "nodeClusterFirewallActionId": "int64"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterFirewallActionService/deleteNodeClusterFirewallAction" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findAllEnabledNodeClusterFirewallActions
> 查询集群的所有动作

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterFirewallActionService/findAllEnabledNodeClusterFirewallActions`
- RPC：`rpc findAllEnabledNodeClusterFirewallActions (FindAllEnabledNodeClusterFirewallActionsRequest) returns (FindAllEnabledNodeClusterFirewallActionsResponse);`

**请求对象 (`FindAllEnabledNodeClusterFirewallActionsRequest`)**

```json
{
  "nodeClusterId": "int64 // 集群ID"
}
```

**响应对象 (`FindAllEnabledNodeClusterFirewallActionsResponse`)**

```json
{
  "nodeClusterFirewallActions": "[]NodeClusterFirewallAction"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterFirewallActionService/findAllEnabledNodeClusterFirewallActions" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findEnabledNodeClusterFirewallAction
> 查询单个动作

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterFirewallActionService/findEnabledNodeClusterFirewallAction`
- RPC：`rpc findEnabledNodeClusterFirewallAction (FindEnabledNodeClusterFirewallActionRequest) returns (FindEnabledNodeClusterFirewallActionResponse);`

**请求对象 (`FindEnabledNodeClusterFirewallActionRequest`)**

```json
{
  "nodeClusterFirewallActionId": "int64"
}
```

**响应对象 (`FindEnabledNodeClusterFirewallActionResponse`)**

```json
{
  "nodeClusterFirewallAction": "NodeClusterFirewallAction"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterFirewallActionService/findEnabledNodeClusterFirewallAction" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## updateNodeClusterFirewallAction
> 修改动作

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterFirewallActionService/updateNodeClusterFirewallAction`
- RPC：`rpc updateNodeClusterFirewallAction (UpdateNodeClusterFirewallActionRequest) returns (RPCSuccess);`

**请求对象 (`UpdateNodeClusterFirewallActionRequest`)**

```json
{
  "nodeClusterFirewallActionId": "int64",
  "name": "string // 名称",
  "eventLevel": "string",
  "type": "string",
  "paramsJSON": "bytes"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterFirewallActionService/updateNodeClusterFirewallAction" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---
