{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Update Instance Alarm",
  "description": "Update a registered alarm's mutable fields. Omit a field to leave it unchanged.",
  "type": "object",
  "properties": {
    "displayName": {
      "type": "string",
      "title": "Display Name",
      "description": "Human-readable name for the alarm. Shown in the UI and in notifications.",
      "examples": ["High CPU"]
    },
    "cloudResourceId": {
      "type": "string",
      "title": "Cloud Resource ID",
      "description": "The cloud provider's unique identifier for the alarm. Updating this changes which incoming webhooks correlate to this alarm.",
      "examples": ["arn:aws:cloudwatch:us-east-1:123456789012:alarm:db-cpu"]
    },
    "comparisonOperator": {
      "type": "string",
      "title": "Comparison Operator",
      "description": "How the metric is compared against `threshold` (e.g., `GREATER_THAN`, `LESS_THAN`).",
      "examples": ["GREATER_THAN", "LESS_THAN"]
    },
    "threshold": {
      "type": "number",
      "title": "Threshold",
      "description": "The value crossed to trigger the alarm.",
      "examples": [80.0]
    },
    "period": {
      "type": "integer",
      "title": "Period (seconds)",
      "description": "Evaluation window in seconds over which the metric is aggregated.",
      "minimum": 1,
      "examples": [60, 300]
    },
    "metric": {
      "type": "object",
      "x-gql-type": "alarm_metric_input",
      "title": "Metric",
      "description": "The cloud metric this alarm evaluates."
    }
  }
}
