{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-networking-services/json-schema/azure-networking-services-azure-firewall-schema.json",
  "title": "AzureFirewall",
  "description": "Azure Firewall resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-networking-services-azurefirewalls-api-openapi.yml#/components/schemas/AzureFirewall",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/AzureFirewallPropertiesFormat",
      "description": "Properties of the azure firewall.",
      "x-ms-client-flatten": true
    },
    "extendedLocation": {
      "$ref": "#/$defs/ExtendedLocation",
      "description": "The extended location of type local virtual network gateway."
    },
    "zones": {
      "type": "array",
      "description": "A list of availability zones denoting where the resource needs to come from.",
      "items": {
        "type": "string"
      }
    },
    "etag": {
      "type": "string",
      "description": "A unique read-only string that changes whenever the resource is updated.",
      "readOnly": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/Resource"
    }
  ],
  "$defs": {
    "AfcConfiguration": {
      "type": "object",
      "description": "AFC configuration for the Azure Firewall.",
      "properties": {
        "serviceEndpoint": {
          "type": "string",
          "description": "The endpoint URL of the AFC control plane associated with this Azure Firewall.",
          "readOnly": true
        }
      }
    },
    "AzureFirewallApplicationRule": {
      "type": "object",
      "description": "Properties of an application rule.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the application rule."
        },
        "description": {
          "type": "string",
          "description": "Description of the rule."
        },
        "sourceAddresses": {
          "type": "array",
          "description": "List of source IP addresses for this rule.",
          "items": {
            "type": "string"
          }
        },
        "protocols": {
          "type": "array",
          "description": "Array of ApplicationRuleProtocols.",
          "items": {
            "$ref": "#/$defs/AzureFirewallApplicationRuleProtocol"
          }
        },
        "targetFqdns": {
          "type": "array",
          "description": "List of FQDNs for this rule.",
          "items": {
            "type": "string"
          }
        },
        "fqdnTags": {
          "type": "array",
          "description": "List of FQDN Tags for this rule.",
          "items": {
            "type": "string"
          }
        },
        "sourceIpGroups": {
          "type": "array",
          "description": "List of source IpGroups for this rule.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "AzureFirewallApplicationRuleCollection": {
      "type": "object",
      "description": "Application rule collection resource.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/AzureFirewallApplicationRuleCollectionPropertiesFormat",
          "description": "Properties of the azure firewall application rule collection.",
          "x-ms-client-flatten": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource that is unique within the Azure firewall. This name can be used to access the resource."
        },
        "etag": {
          "type": "string",
          "description": "A unique read-only string that changes whenever the resource is updated.",
          "readOnly": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/SubResource"
        }
      ]
    },
    "AzureFirewallApplicationRuleCollectionPropertiesFormat": {
      "type": "object",
      "description": "Properties of the application rule collection.",
      "properties": {
        "priority": {
          "type": "integer",
          "format": "int32",
          "description": "Priority of the application rule collection resource.",
          "minimum": 100,
          "maximum": 65000
        },
        "action": {
          "$ref": "#/$defs/AzureFirewallRCAction",
          "description": "The action type of a rule collection."
        },
        "rules": {
          "type": "array",
          "description": "Collection of rules used by a application rule collection.",
          "items": {
            "$ref": "#/$defs/AzureFirewallApplicationRule"
          }
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the application rule collection resource.",
          "readOnly": true
        }
      }
    },
    "AzureFirewallApplicationRuleProtocol": {
      "type": "object",
      "description": "Properties of the application rule protocol.",
      "properties": {
        "protocolType": {
          "$ref": "#/$defs/AzureFirewallApplicationRuleProtocolType",
          "description": "Protocol type."
        },
        "port": {
          "type": "integer",
          "format": "int32",
          "description": "Port number for the protocol, cannot be greater than 64000. This field is optional.",
          "minimum": 0,
          "maximum": 64000
        }
      }
    },
    "AzureFirewallApplicationRuleProtocolType": {
      "type": "string",
      "description": "The protocol type of a Application Rule resource.",
      "enum": [
        "Http",
        "Https",
        "Mssql"
      ],
      "x-ms-enum": {
        "name": "AzureFirewallApplicationRuleProtocolType",
        "modelAsString": true,
        "values": [
          {
            "name": "Http",
            "value": "Http",
            "description": "Http"
          },
          {
            "name": "Https",
            "value": "Https",
            "description": "Https"
          },
          {
            "name": "Mssql",
            "value": "Mssql",
            "description": "Mssql"
          }
        ]
      }
    },
    "AzureFirewallAutoscaleConfiguration": {
      "type": "object",
      "description": "Azure Firewall Autoscale Configuration parameters.",
      "properties": {
        "minCapacity": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "The minimum number of capacity units for this azure firewall. Use null to reset the value to the service default.",
          "minimum": 2
        },
        "maxCapacity": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "The maximum number of capacity units for this azure firewall. Use null to reset the value to the service default.",
          "minimum": 2
        }
      }
    },
    "AzureFirewallIPConfiguration": {
      "type": "object",
      "description": "IP configuration of an Azure Firewall.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/AzureFirewallIPConfigurationPropertiesFormat",
          "description": "Properties of the azure firewall IP configuration.",
          "x-ms-client-flatten": true
        },
        "name": {
          "type": "string",
          "description": "Name of the resource that is unique within a resource group. This name can be used to access the resource."
        },
        "etag": {
          "type": "string",
          "description": "A unique read-only string that changes whenever the resource is updated.",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "Type of the resource.",
          "readOnly": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/SubResource"
        }
      ]
    },
    "AzureFirewallIPConfigurationPropertiesFormat": {
      "type": "object",
      "description": "Properties of IP configuration of an Azure Firewall.",
      "properties": {
        "privateIPAddress": {
          "type": "string",
          "description": "The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.",
          "readOnly": true
        },
        "subnet": {
          "$ref": "#/$defs/SubResource",
          "description": "Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'."
        },
        "publicIPAddress": {
          "$ref": "#/$defs/SubResource",
          "description": "Reference to the PublicIP resource. This field is a mandatory input if subnet is not null."
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the Azure firewall IP configuration resource.",
          "readOnly": true
        }
      }
    },
    "AzureFirewallIpGroups": {
      "type": "object",
      "description": "IpGroups associated with azure firewall.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID.",
          "readOnly": true
        },
        "changeNumber": {
          "type": "string",
          "description": "The iteration number.",
          "readOnly": true
        }
      }
    },
    "AzureFirewallNatRCAction": {
      "type": "object",
      "description": "AzureFirewall NAT Rule Collection Action.",
      "properties": {
        "type": {
          "$ref": "#/$defs/AzureFirewallNatRCActionType",
          "description": "The type of action."
        }
      }
    },
    "AzureFirewallNatRCActionType": {
      "type": "string",
      "description": "The action type of a NAT rule collection.",
      "enum": [
        "Snat",
        "Dnat"
      ],
      "x-ms-enum": {
        "name": "AzureFirewallNatRCActionType",
        "modelAsString": true,
        "values": [
          {
            "name": "Snat",
            "value": "Snat",
            "description": "Snat"
          },
          {
            "name": "Dnat",
            "value": "Dnat",
            "description": "Dnat"
          }
        ]
      }
    },
    "AzureFirewallNatRule": {
      "type": "object",
      "description": "Properties of a NAT rule.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the NAT rule."
        },
        "description": {
          "type": "string",
          "description": "Description of the rule."
        },
        "sourceAddresses": {
          "type": "array",
          "description": "List of source IP addresses for this rule.",
          "items": {
            "type": "string"
          }
        },
        "destinationAddresses": {
          "type": "array",
          "description": "List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.",
          "items": {
            "type": "string"
          }
        },
        "destinationPorts": {
          "type": "array",
          "description": "List of destination ports.",
          "items": {
            "type": "string"
          }
        },
        "protocols": {
          "type": "array",
          "description": "Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.",
          "items": {
            "$ref": "#/$defs/AzureFirewallNetworkRuleProtocol"
          }
        },
        "translatedAddress": {
          "type": "string",
          "description": "The translated address for this NAT rule."
        },
        "translatedPort": {
          "type": "string",
          "description": "The translated port for this NAT rule."
        },
        "translatedFqdn": {
          "type": "string",
          "description": "The translated FQDN for this NAT rule."
        },
        "sourceIpGroups": {
          "type": "array",
          "description": "List of source IpGroups for this rule.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "AzureFirewallNatRuleCollection": {
      "type": "object",
      "description": "NAT rule collection resource.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/AzureFirewallNatRuleCollectionProperties",
          "description": "Properties of the azure firewall NAT rule collection.",
          "x-ms-client-flatten": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource that is unique within the Azure firewall. This name can be used to access the resource."
        },
        "etag": {
          "type": "string",
          "description": "A unique read-only string that changes whenever the resource is updated.",
          "readOnly": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/SubResource"
        }
      ]
    },
    "AzureFirewallNatRuleCollectionProperties": {
      "type": "object",
      "description": "Properties of the NAT rule collection.",
      "properties": {
        "priority": {
          "type": "integer",
          "format": "int32",
          "description": "Priority of the NAT rule collection resource.",
          "minimum": 100,
          "maximum": 65000
        },
        "action": {
          "$ref": "#/$defs/AzureFirewallNatRCAction",
          "description": "The action type of a NAT rule collection."
        },
        "rules": {
          "type": "array",
          "description": "Collection of rules used by a NAT rule collection.",
          "items": {
            "$ref": "#/$defs/AzureFirewallNatRule"
          }
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the NAT rule collection resource.",
          "readOnly": true
        }
      }
    },
    "AzureFirewallNetworkRule": {
      "type": "object",
      "description": "Properties of the network rule.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the network rule."
        },
        "description": {
          "type": "string",
          "description": "Description of the rule."
        },
        "protocols": {
          "type": "array",
          "description": "Array of AzureFirewallNetworkRuleProtocols.",
          "items": {
            "$ref": "#/$defs/AzureFirewallNetworkRuleProtocol"
          }
        },
        "sourceAddresses": {
          "type": "array",
          "description": "List of source IP addresses for this rule.",
          "items": {
            "type": "string"
          }
        },
        "destinationAddresses": {
          "type": "array",
          "description": "List of destination IP addresses.",
          "items": {
            "type": "string"
          }
        },
        "destinationPorts": {
          "type": "array",
          "description": "List of destination ports.",
          "items": {
            "type": "string"
          }
        },
        "destinationFqdns": {
          "type": "array",
          "description": "List of destination FQDNs.",
          "items": {
            "type": "string"
          }
        },
        "sourceIpGroups": {
          "type": "array",
          "description": "List of source IpGroups for this rule.",
          "items": {
            "type": "string"
          }
        },
        "destinationIpGroups": {
          "type": "array",
          "description": "List of destination IpGroups for this rule.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "AzureFirewallNetworkRuleCollection": {
      "type": "object",
      "description": "Network rule collection resource.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/AzureFirewallNetworkRuleCollectionPropertiesFormat",
          "description": "Properties of the azure firewall network rule collection.",
          "x-ms-client-flatten": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource that is unique within the Azure firewall. This name can be used to access the resource."
        },
        "etag": {
          "type": "string",
          "description": "A unique read-only string that changes whenever the resource is updated.",
          "readOnly": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/SubResource"
        }
      ]
    },
    "AzureFirewallNetworkRuleCollectionPropertiesFormat": {
      "type": "object",
      "description": "Properties of the network rule collection.",
      "properties": {
        "priority": {
          "type": "integer",
          "format": "int32",
          "description": "Priority of the network rule collection resource.",
          "minimum": 100,
          "maximum": 65000
        },
        "action": {
          "$ref": "#/$defs/AzureFirewallRCAction",
          "description": "The action type of a rule collection."
        },
        "rules": {
          "type": "array",
          "description": "Collection of rules used by a network rule collection.",
          "items": {
            "$ref": "#/$defs/AzureFirewallNetworkRule"
          }
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the network rule collection resource.",
          "readOnly": true
        }
      }
    },
    "AzureFirewallNetworkRuleProtocol": {
      "type": "string",
      "description": "The protocol of a Network Rule resource.",
      "enum": [
        "TCP",
        "UDP",
        "Any",
        "ICMP"
      ],
      "x-ms-enum": {
        "name": "AzureFirewallNetworkRuleProtocol",
        "modelAsString": true,
        "values": [
          {
            "name": "TCP",
            "value": "TCP",
            "description": "TCP"
          },
          {
            "name": "UDP",
            "value": "UDP",
            "description": "UDP"
          },
          {
            "name": "Any",
            "value": "Any",
            "description": "Any"
          },
          {
            "name": "ICMP",
            "value": "ICMP",
            "description": "ICMP"
          }
        ]
      }
    },
    "AzureFirewallPropertiesFormat": {
      "type": "object",
      "description": "Properties of the Azure Firewall.",
      "properties": {
        "applicationRuleCollections": {
          "type": "array",
          "description": "Collection of application rule collections used by Azure Firewall.",
          "items": {
            "$ref": "#/$defs/AzureFirewallApplicationRuleCollection"
          }
        },
        "natRuleCollections": {
          "type": "array",
          "description": "Collection of NAT rule collections used by Azure Firewall.",
          "items": {
            "$ref": "#/$defs/AzureFirewallNatRuleCollection"
          }
        },
        "networkRuleCollections": {
          "type": "array",
          "description": "Collection of network rule collections used by Azure Firewall.",
          "items": {
            "$ref": "#/$defs/AzureFirewallNetworkRuleCollection"
          }
        },
        "ipConfigurations": {
          "type": "array",
          "description": "IP configuration of the Azure Firewall resource.",
          "items": {
            "$ref": "#/$defs/AzureFirewallIPConfiguration"
          }
        },
        "managementIpConfiguration": {
          "$ref": "#/$defs/AzureFirewallIPConfiguration",
          "description": "IP configuration of the Azure Firewall used for management traffic."
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the Azure firewall resource.",
          "readOnly": true
        },
        "threatIntelMode": {
          "$ref": "#/$defs/AzureFirewallThreatIntelMode",
          "description": "The operation mode for Threat Intelligence."
        },
        "virtualHub": {
          "$ref": "#/$defs/SubResource",
          "description": "The virtualHub to which the firewall belongs."
        },
        "firewallPolicy": {
          "$ref": "#/$defs/SubResource",
          "description": "The firewallPolicy associated with this azure firewall."
        },
        "hubIPAddresses": {
          "$ref": "#/$defs/HubIPAddresses",
          "description": "IP addresses associated with AzureFirewall."
        },
        "ipGroups": {
          "type": "array",
          "description": "IpGroups associated with AzureFirewall.",
          "items": {
            "$ref": "#/$defs/AzureFirewallIpGroups"
          },
          "readOnly": true
        },
        "sku": {
          "$ref": "#/$defs/AzureFirewallSku",
          "description": "The Azure Firewall Resource SKU."
        },
        "additionalProperties": {
          "type": "object",
          "description": "The additional properties used to further config this azure firewall.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "autoscaleConfiguration": {
          "$ref": "#/$defs/AzureFirewallAutoscaleConfiguration",
          "description": "Properties to provide a custom autoscale configuration to this azure firewall."
        },
        "afcConfiguration": {
          "$ref": "#/$defs/AfcConfiguration",
          "description": "AFC configuration for the Azure Firewall.",
          "readOnly": true
        },
        "aiSecurityAddOn": {
          "type": "boolean",
          "description": "Indicates whether the AI security add-on is enabled for the Azure Firewall."
        }
      }
    },
    "AzureFirewallPublicIPAddress": {
      "type": "object",
      "description": "Public IP Address associated with azure firewall.",
      "properties": {
        "address": {
          "type": "string",
          "description": "Public IP Address value."
        }
      }
    },
    "AzureFirewallRCAction": {
      "type": "object",
      "description": "Properties of the AzureFirewallRCAction.",
      "properties": {
        "type": {
          "$ref": "#/$defs/AzureFirewallRCActionType",
          "description": "The type of action."
        }
      }
    },
    "AzureFirewallRCActionType": {
      "type": "string",
      "description": "The action type of a rule collection.",
      "enum": [
        "Allow",
        "Deny"
      ],
      "x-ms-enum": {
        "name": "AzureFirewallRCActionType",
        "modelAsString": true,
        "values": [
          {
            "name": "Allow",
            "value": "Allow",
            "description": "Allow"
          },
          {
            "name": "Deny",
            "value": "Deny",
            "description": "Deny"
          }
        ]
      }
    },
    "AzureFirewallSku": {
      "type": "object",
      "description": "SKU of an Azure Firewall.",
      "properties": {
        "name": {
          "$ref": "#/$defs/AzureFirewallSkuName",
          "description": "Name of an Azure Firewall SKU."
        },
        "tier": {
          "$ref": "#/$defs/AzureFirewallSkuTier",
          "description": "Tier of an Azure Firewall."
        }
      }
    },
    "AzureFirewallSkuName": {
      "type": "string",
      "description": "Name of an Azure Firewall SKU.",
      "enum": [
        "AZFW_VNet",
        "AZFW_Hub"
      ],
      "x-ms-enum": {
        "name": "AzureFirewallSkuName",
        "modelAsString": true,
        "values": [
          {
            "name": "AZFW_VNet",
            "value": "AZFW_VNet",
            "description": "AZFW_VNet"
          },
          {
            "name": "AZFW_Hub",
            "value": "AZFW_Hub",
            "description": "AZFW_Hub"
          }
        ]
      }
    },
    "AzureFirewallSkuTier": {
      "type": "string",
      "description": "Tier of an Azure Firewall.",
      "enum": [
        "Standard",
        "Premium",
        "Basic"
      ],
      "x-ms-enum": {
        "name": "AzureFirewallSkuTier",
        "modelAsString": true,
        "values": [
          {
            "name": "Standard",
            "value": "Standard",
            "description": "Standard"
          },
          {
            "name": "Premium",
            "value": "Premium",
            "description": "Premium"
          },
          {
            "name": "Basic",
            "value": "Basic",
            "description": "Basic"
          }
        ]
      }
    },
    "AzureFirewallThreatIntelMode": {
      "type": "string",
      "description": "The operation mode for Threat Intel.",
      "enum": [
        "Alert",
        "Deny",
        "Off"
      ],
      "x-ms-enum": {
        "name": "AzureFirewallThreatIntelMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Alert",
            "value": "Alert",
            "description": "Alert"
          },
          {
            "name": "Deny",
            "value": "Deny",
            "description": "Deny"
          },
          {
            "name": "Off",
            "value": "Off",
            "description": "Off"
          }
        ]
      }
    },
    "ExtendedLocation": {
      "type": "object",
      "description": "ExtendedLocation complex type.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the extended location."
        },
        "type": {
          "$ref": "#/$defs/ExtendedLocationTypes",
          "description": "The type of the extended location."
        }
      }
    },
    "HubIPAddresses": {
      "type": "object",
      "description": "IP addresses associated with azure firewall.",
      "properties": {
        "publicIPs": {
          "$ref": "#/$defs/HubPublicIPAddresses",
          "description": "Public IP addresses associated with azure firewall."
        },
        "privateIPAddress": {
          "type": "string",
          "description": "Private IP Address associated with azure firewall."
        }
      }
    },
    "HubPublicIPAddresses": {
      "type": "object",
      "description": "Public IP addresses associated with azure firewall.",
      "properties": {
        "addresses": {
          "type": "array",
          "description": "The list of Public IP addresses associated with azure firewall or IP addresses to be retained.",
          "items": {
            "$ref": "#/$defs/AzureFirewallPublicIPAddress"
          }
        },
        "count": {
          "type": "integer",
          "format": "int32",
          "description": "The number of Public IP addresses associated with azure firewall."
        }
      }
    },
    "ProvisioningState": {
      "type": "string",
      "description": "Provisioning states of a resource.",
      "enum": [
        "Failed",
        "Succeeded",
        "Canceled",
        "Creating",
        "Updating",
        "Deleting"
      ],
      "x-ms-enum": {
        "name": "ProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Canceled"
          },
          {
            "name": "Creating",
            "value": "Creating",
            "description": "Creating"
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "Updating"
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "Deleting"
          }
        ]
      }
    },
    "Resource": {
      "type": "object",
      "description": "Common resource representation.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        },
        "name": {
          "type": "string",
          "description": "Resource name.",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "Resource type.",
          "readOnly": true
        },
        "location": {
          "type": "string",
          "description": "Resource location."
        },
        "tags": {
          "type": "object",
          "description": "Resource tags.",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "x-ms-azure-resource": true
    },
    "SubResource": {
      "type": "object",
      "description": "Reference to another subresource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        }
      }
    }
  }
}