方法列表
获取所有可用策略
admin
RPC
findAllEnabledHTTPFirewallPolicies (FindAllEnabledHTTPFirewallPoliciesRequest) returns (FindAllEnabledHTTPFirewallPoliciesResponse)
HTTP
POST /HTTPFirewallPolicyService/findAllEnabledHTTPFirewallPolicies
输入对象:FindAllEnabledHTTPFirewallPoliciesRequest:
{ }
输出对象:FindAllEnabledHTTPFirewallPoliciesResponse:
创建防火墙策略
admin
user
RPC
createHTTPFirewallPolicy (CreateHTTPFirewallPolicyRequest) returns (CreateHTTPFirewallPolicyResponse)
HTTP
POST /HTTPFirewallPolicyService/createHTTPFirewallPolicy
输入对象:CreateHTTPFirewallPolicyRequest:
{ // 是否启用 bool isOn; // 名称 string name; // 描述(备注) string description; []string httpFirewallGroupCodes; // 服务ID(网站ID) int64 serverId; // 服务分组ID(网站分组ID) int64 serverGroupId; }
输出对象:CreateHTTPFirewallPolicyResponse:
创建空防火墙策略
admin
user
RPC
createEmptyHTTPFirewallPolicy (CreateEmptyHTTPFirewallPolicyRequest) returns (CreateEmptyHTTPFirewallPolicyResponse)
HTTP
POST /HTTPFirewallPolicyService/createEmptyHTTPFirewallPolicy
输入对象:CreateEmptyHTTPFirewallPolicyRequest:
{ // 是否启用 bool isOn; // 名称 string name; // 描述(备注) string description; // 服务ID(网站ID) int64 serverId; // 服务分组ID(网站分组ID) int64 serverGroupId; }
输出对象:CreateEmptyHTTPFirewallPolicyResponse:
修改防火墙策略
admin
RPC
updateHTTPFirewallPolicy (UpdateHTTPFirewallPolicyRequest) returns (RPCSuccess)
HTTP
POST /HTTPFirewallPolicyService/updateHTTPFirewallPolicy
输入对象:UpdateHTTPFirewallPolicyRequest:
{ int64 httpFirewallPolicyId; // 是否启用 bool isOn; // 名称 string name; // 描述(备注) string description; []string firewallGroupCodes; // 阻止动作配置 bytes blockOptionsJSON; // 显示网页动作配置 bytes pageOptionsJSON; // 验证码动作配置 bytes captchaOptionsJSON; // JSCookie动作配置 bytes jsCookieOptionsJSON; string mode; // 是否使用本地防火墙 bool useLocalFirewall; // SYN Flood相关配置 bytes synFloodJSON; // 日志相关配置 bytes LogJSON; // 最大文件尺寸,单位为字节 int64 maxRequestBodySize; // 区域封禁提示 string denyCountryHTML; // 省份封禁提示 string denyProvinceHTML; }
输出对象:RPCSuccess:
{ }
修改分组信息
admin
user
RPC
updateHTTPFirewallPolicyGroups (UpdateHTTPFirewallPolicyGroupsRequest) returns (RPCSuccess)
HTTP
POST /HTTPFirewallPolicyService/updateHTTPFirewallPolicyGroups
输入对象:UpdateHTTPFirewallPolicyGroupsRequest:
输出对象:RPCSuccess:
{ }
修改inbound信息
admin
user
RPC
updateHTTPFirewallInboundConfig (UpdateHTTPFirewallInboundConfigRequest) returns (RPCSuccess)
HTTP
POST /HTTPFirewallPolicyService/updateHTTPFirewallInboundConfig
输入对象:UpdateHTTPFirewallInboundConfigRequest:
输出对象:RPCSuccess:
{ }
计算可用的防火墙策略数量
admin
RPC
countAllEnabledHTTPFirewallPolicies (CountAllEnabledHTTPFirewallPoliciesRequest) returns (RPCCountResponse)
HTTP
POST /HTTPFirewallPolicyService/countAllEnabledHTTPFirewallPolicies
输入对象:CountAllEnabledHTTPFirewallPoliciesRequest:
{ // 关键词 string keyword; // 集群ID int64 nodeClusterId; }
输出对象:RPCCountResponse:
{ // 数量 int64 count; }
列出单页的防火墙策略
admin
RPC
listEnabledHTTPFirewallPolicies (ListEnabledHTTPFirewallPoliciesRequest) returns (ListEnabledHTTPFirewallPoliciesResponse)
HTTP
POST /HTTPFirewallPolicyService/listEnabledHTTPFirewallPolicies
输入对象:ListEnabledHTTPFirewallPoliciesRequest:
{ // 读取位置 int64 offset; // 数量,通常不能小于0 int64 size; // 关键词 string keyword; // 集群ID int64 nodeClusterId; }
输出对象:ListEnabledHTTPFirewallPoliciesResponse:
删除某个防火墙策略
admin
RPC
deleteHTTPFirewallPolicy (DeleteHTTPFirewallPolicyRequest) returns (RPCSuccess)
HTTP
POST /HTTPFirewallPolicyService/deleteHTTPFirewallPolicy
输入对象:DeleteHTTPFirewallPolicyRequest:
输出对象:RPCSuccess:
{ }
查找单个防火墙配置
admin
user
RPC
findEnabledHTTPFirewallPolicyConfig (FindEnabledHTTPFirewallPolicyConfigRequest) returns (FindEnabledHTTPFirewallPolicyConfigResponse)
HTTP
POST /HTTPFirewallPolicyService/findEnabledHTTPFirewallPolicyConfig
输入对象:FindEnabledHTTPFirewallPolicyConfigRequest:
输出对象:FindEnabledHTTPFirewallPolicyConfigResponse:
获取防火墙的基本信息
admin
user
RPC
findEnabledHTTPFirewallPolicy (FindEnabledHTTPFirewallPolicyRequest) returns (FindEnabledHTTPFirewallPolicyResponse)
HTTP
POST /HTTPFirewallPolicyService/findEnabledHTTPFirewallPolicy
输入对象:FindEnabledHTTPFirewallPolicyRequest:
输出对象:FindEnabledHTTPFirewallPolicyResponse:
导入策略数据
admin
RPC
importHTTPFirewallPolicy (ImportHTTPFirewallPolicyRequest) returns (RPCSuccess)
HTTP
POST /HTTPFirewallPolicyService/importHTTPFirewallPolicy
输入对象:ImportHTTPFirewallPolicyRequest:
输出对象:RPCSuccess:
{ }
检查IP状态
admin
user
RPC
checkHTTPFirewallPolicyIPStatus (CheckHTTPFirewallPolicyIPStatusRequest) returns (CheckHTTPFirewallPolicyIPStatusResponse)
HTTP
POST /HTTPFirewallPolicyService/checkHTTPFirewallPolicyIPStatus
输入对象:CheckHTTPFirewallPolicyIPStatusRequest:
输出对象:CheckHTTPFirewallPolicyIPStatusResponse:
{ // 是否查询成功 bool isOk; // 错误信息 string error; // 是否找到 bool isFound; // 是否允许访问 bool isAllowed; // 匹配的IPList IPList ipList; // 匹配的IPItem IPItem ipItem; // 匹配到封禁的地区 RegionCountry regionCountry; // 匹配到封禁的省份 RegionProvince regionProvince; }
获取防火墙对应的网站ID
admin
user
RPC
findServerIdWithHTTPFirewallPolicyId (FindServerIdWithHTTPFirewallPolicyIdRequest) returns (FindServerIdWithHTTPFirewallPolicyIdResponse)
HTTP
POST /HTTPFirewallPolicyService/findServerIdWithHTTPFirewallPolicyId
输入对象:FindServerIdWithHTTPFirewallPolicyIdRequest:
{ // 防火墙策略ID int64 httpFirewallPolicyId; }
输出对象:FindServerIdWithHTTPFirewallPolicyIdResponse:
{ // 防火墙策略对应的网站ID,公共的防火墙策略的网站ID为0 int64 serverId; }