{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-networking-services/json-schema/azure-networking-services-firewall-packet-capture-parameters-schema.json",
  "title": "FirewallPacketCaptureParameters",
  "description": "Azure Firewall Packet Capture Parameters.",
  "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/FirewallPacketCaptureParameters",
  "type": "object",
  "properties": {
    "durationInSeconds": {
      "type": "integer",
      "format": "int32",
      "description": "Duration of packet capture in seconds. If the field is not provided, the default value is 60.",
      "default": 60,
      "minimum": 30,
      "maximum": 1800
    },
    "numberOfPacketsToCapture": {
      "type": "integer",
      "format": "int32",
      "description": "Number of packets to be captured. If the field is not provided, the default value is 1000.",
      "default": 1000,
      "minimum": 100,
      "maximum": 90000
    },
    "sasUrl": {
      "type": "string",
      "description": "Upload capture location"
    },
    "fileName": {
      "type": "string",
      "description": "Name of file to be uploaded to sasURL"
    },
    "protocol": {
      "$ref": "#/$defs/AzureFirewallNetworkRuleProtocol",
      "description": "The protocol of packets to capture"
    },
    "flags": {
      "type": "array",
      "description": "The tcp-flag type to be captured. Used with protocol TCP",
      "items": {
        "$ref": "#/$defs/AzureFirewallPacketCaptureFlags"
      },
      "x-ms-identifiers": []
    },
    "filters": {
      "type": "array",
      "description": "Rules to filter packet captures.",
      "items": {
        "$ref": "#/$defs/AzureFirewallPacketCaptureRule"
      },
      "x-ms-identifiers": []
    },
    "operation": {
      "type": "string",
      "description": "The packet capture operation to perform. If the Start operation is selected, please provide all the fields in the firewallPacketCaptureParameters to successfully initiate the packet capture. If the Status or Stop operation is selected, only the operation field is required; all other fields in the firewallPacketCaptureParameters can be omitted to successfully retrieve the capture status or stop the capture.",
      "default": "Start",
      "enum": [
        "Start",
        "Status",
        "Stop"
      ],
      "x-ms-enum": {
        "name": "AzureFirewallPacketCaptureOperationType",
        "modelAsString": true,
        "values": [
          {
            "name": "Start",
            "value": "Start",
            "description": "Start"
          },
          {
            "name": "Status",
            "value": "Status",
            "description": "Status"
          },
          {
            "name": "Stop",
            "value": "Stop",
            "description": "Stop"
          }
        ]
      }
    }
  },
  "$defs": {
    "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"
          }
        ]
      }
    },
    "AzureFirewallPacketCaptureFlags": {
      "type": "object",
      "description": "Properties of the AzureFirewallRCAction.",
      "properties": {
        "type": {
          "$ref": "#/$defs/AzureFirewallPacketCaptureFlagsType",
          "description": "Flags to capture"
        }
      }
    },
    "AzureFirewallPacketCaptureFlagsType": {
      "type": "string",
      "description": "The flags type to be captured.",
      "enum": [
        "fin",
        "syn",
        "rst",
        "push",
        "ack",
        "urg"
      ],
      "x-ms-enum": {
        "name": "AzureFirewallPacketCaptureFlagsType",
        "modelAsString": true,
        "values": [
          {
            "name": "fin",
            "value": "fin",
            "description": "fin"
          },
          {
            "name": "syn",
            "value": "syn",
            "description": "syn"
          },
          {
            "name": "rst",
            "value": "rst",
            "description": "rst"
          },
          {
            "name": "push",
            "value": "push",
            "description": "push"
          },
          {
            "name": "ack",
            "value": "ack",
            "description": "ack"
          },
          {
            "name": "urg",
            "value": "urg",
            "description": "urg"
          }
        ]
      }
    },
    "AzureFirewallPacketCaptureRule": {
      "type": "object",
      "description": "Group of src/dest ips and ports to be captured.",
      "properties": {
        "sources": {
          "type": "array",
          "description": "List of source IP addresses/subnets to be captured.",
          "items": {
            "type": "string"
          }
        },
        "destinations": {
          "type": "array",
          "description": "List of destination IP addresses/subnets to be captured.",
          "items": {
            "type": "string"
          }
        },
        "destinationPorts": {
          "type": "array",
          "description": "List of ports to be captured.",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}