{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/edge-network/json-schema/edge-network-security-group-schema.json",
  "title": "SecurityGroup",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/edge-network-openapi.json#/components/schemas/SecurityGroup",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "direction": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ]
          },
          "protocol": {
            "type": "string",
            "enum": [
              "tcp",
              "udp",
              "icmp",
              "all"
            ]
          },
          "portRange": {
            "type": "string",
            "description": "Port or range, e.g. \"80\" or \"8000-9000\". Omit for all ports."
          },
          "source": {
            "type": "string",
            "description": "Source CIDR, e.g. 0.0.0.0/0."
          }
        }
      }
    }
  },
  "required": [
    "id",
    "name"
  ]
}