{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ovh/json-schema/ovh-ip-firewall-network-rule-schema.json",
  "title": "ip.FirewallNetworkRule",
  "description": "Rule on ip",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ovh-v1-ip-openapi.yml#/components/schemas/ip.FirewallNetworkRule",
  "type": "object",
  "properties": {
    "action": {
      "allOf": [
        {
          "$ref": "#/$defs/ip.FirewallActionEnum"
        }
      ],
      "description": "Action on this rule",
      "readOnly": true
    },
    "creationDate": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "destination": {
      "type": "string",
      "description": "Destination ip for your rule",
      "readOnly": true
    },
    "destinationPort": {
      "type": [
        "string",
        "null"
      ],
      "description": "Destination port range for your rule. Only with TCP/UDP protocol",
      "readOnly": true
    },
    "fragments": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Fragments option",
      "readOnly": true
    },
    "l3PacketLength": {
      "type": [
        "string",
        "null"
      ],
      "description": "IP packet's total length",
      "readOnly": true
    },
    "protocol": {
      "allOf": [
        {
          "$ref": "#/$defs/ip.FirewallProtocolEnum"
        }
      ],
      "description": "Network protocol",
      "readOnly": true
    },
    "rule": {
      "type": "string",
      "readOnly": true
    },
    "sequence": {
      "type": "integer",
      "readOnly": true
    },
    "source": {
      "type": "string",
      "description": "Source ip for your rule",
      "readOnly": true
    },
    "sourcePort": {
      "type": [
        "string",
        "null"
      ],
      "description": "Source port range for your rule. Only with TCP/UDP protocol",
      "readOnly": true
    },
    "state": {
      "allOf": [
        {
          "$ref": "#/$defs/ip.FirewallRuleStateEnum"
        }
      ],
      "description": "Current state of your rule",
      "readOnly": true
    },
    "tcpOption": {
      "type": [
        "string",
        "null"
      ],
      "description": "TCP option on your rule",
      "readOnly": true
    }
  },
  "$defs": {
    "ip.FirewallActionEnum": {
      "type": "string",
      "description": "Possible values for action",
      "enum": [
        "deny",
        "permit"
      ]
    },
    "ip.FirewallProtocolEnum": {
      "type": "string",
      "description": "Possible values for protocol",
      "enum": [
        "ah",
        "esp",
        "gre",
        "icmp",
        "ipv4",
        "tcp",
        "udp"
      ]
    },
    "ip.FirewallRuleStateEnum": {
      "type": "string",
      "description": "Possible values for firewall rule state",
      "enum": [
        "creationPending",
        "ok",
        "removalPending"
      ]
    }
  }
}