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

5.0 KiB
Raw Blame History

NodeClusterFirewallActionService

防火墙动作服务


countAllEnabledNodeClusterFirewallActions

计算动作数量

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeClusterFirewallActionService/countAllEnabledNodeClusterFirewallActions
  • RPCrpc countAllEnabledNodeClusterFirewallActions (CountAllEnabledNodeClusterFirewallActionsRequest) returns (RPCCountResponse);

请求对象 (CountAllEnabledNodeClusterFirewallActionsRequest)

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

响应对象 (RPCCountResponse)

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

调用示例

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

createNodeClusterFirewallAction

创建动作

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeClusterFirewallActionService/createNodeClusterFirewallAction
  • RPCrpc createNodeClusterFirewallAction (CreateNodeClusterFirewallActionRequest) returns (NodeClusterFirewallActionResponse);

请求对象 (CreateNodeClusterFirewallActionRequest)

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

响应对象 (NodeClusterFirewallActionResponse)

{
  "nodeClusterFirewallActionId": "int64"
}

调用示例

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

deleteNodeClusterFirewallAction

删除动作

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeClusterFirewallActionService/deleteNodeClusterFirewallAction
  • RPCrpc deleteNodeClusterFirewallAction (DeleteNodeClusterFirewallActionRequest) returns (RPCSuccess);

请求对象 (DeleteNodeClusterFirewallActionRequest)

{
  "nodeClusterFirewallActionId": "int64"
}

响应对象 (RPCSuccess)

{}

调用示例

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

findAllEnabledNodeClusterFirewallActions

查询集群的所有动作

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeClusterFirewallActionService/findAllEnabledNodeClusterFirewallActions
  • RPCrpc findAllEnabledNodeClusterFirewallActions (FindAllEnabledNodeClusterFirewallActionsRequest) returns (FindAllEnabledNodeClusterFirewallActionsResponse);

请求对象 (FindAllEnabledNodeClusterFirewallActionsRequest)

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

响应对象 (FindAllEnabledNodeClusterFirewallActionsResponse)

{
  "nodeClusterFirewallActions": "[]NodeClusterFirewallAction"
}

调用示例

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

findEnabledNodeClusterFirewallAction

查询单个动作

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeClusterFirewallActionService/findEnabledNodeClusterFirewallAction
  • RPCrpc findEnabledNodeClusterFirewallAction (FindEnabledNodeClusterFirewallActionRequest) returns (FindEnabledNodeClusterFirewallActionResponse);

请求对象 (FindEnabledNodeClusterFirewallActionRequest)

{
  "nodeClusterFirewallActionId": "int64"
}

响应对象 (FindEnabledNodeClusterFirewallActionResponse)

{
  "nodeClusterFirewallAction": "NodeClusterFirewallAction"
}

调用示例

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

updateNodeClusterFirewallAction

修改动作

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeClusterFirewallActionService/updateNodeClusterFirewallAction
  • RPCrpc updateNodeClusterFirewallAction (UpdateNodeClusterFirewallActionRequest) returns (RPCSuccess);

请求对象 (UpdateNodeClusterFirewallActionRequest)

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

响应对象 (RPCSuccess)

{}

调用示例

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