{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/argus-town/json-schema/argus-town-alert-rule-update-body-schema.json",
  "title": "AlertRuleUpdateBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/argus-town-alerts-api-openapi.yml#/components/schemas/AlertRuleUpdateBody",
  "type": "object",
  "required": [],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "low_balance",
        "days_to_zero",
        "spend_spike",
        "projected_overage",
        "rate_limit_headroom",
        "error_rate",
        "cost_drift"
      ]
    },
    "threshold": {
      "type": "number",
      "description": "a number between 0 and 1000000000000",
      "title": "between(0, 1000000000000)",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "connections": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "an array of at most 50 item(s)",
          "title": "maxItems(50)",
          "minItems": 1,
          "maxItems": 50
        },
        {
          "type": "null"
        }
      ],
      "description": "`null` makes the rule watch every connection."
    },
    "enabled": {
      "type": "boolean"
    }
  },
  "additionalProperties": true
}