云防火墙 CFW-创建ACL规则:请求示例

时间:2024-10-31 19:35:56

请求示例

示例为添加一个IPv4类型的外到内的规则,名称为测试规则,源类型为IP地址,地址为1.1.1.1,目的类型为IP地址,目的地址为2.2.2.2,服务类型为服务,协议类型为TCP,源端口为0,目的端口为0,不支持长连接,动作为放行,启用状态为启用

https://{Endpoint}/v1/9d80d070b6d44942af73c9c3d38e0429/acl-rule

{
  "object_id" : "ae42418e-f077-41a0-9d3b-5b2f5ad9102b",
  "rules" : [ {
    "name" : "测试规则",
    "status" : 1,
    "action_type" : 0,
    "description" : "",
    "source" : {
      "type" : 0,
      "address" : "1.1.1.1"
    },
    "destination" : {
      "type" : 0,
      "address" : "2.2.2.2"
    },
    "service" : {
      "type" : 0,
      "protocol" : 6,
      "source_port" : "0",
      "dest_port" : "0"
    },
    "address_type" : 0,
    "tag" : {
      "tag_key" : "",
      "tag_value" : ""
    },
    "long_connect_enable" : 0,
    "direction" : 0,
    "sequence" : {
      "top" : 1,
      "dest_rule_id" : null
    }
  } ],
  "type" : 0
}
support.huaweicloud.com/api-cfw/AddAclRule.html