{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-maintenance-config-v2-schema.json",
  "title": "MaintenanceConfigV2",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-maintenance-configuration-api-openapi.yml#/components/schemas/MaintenanceConfigV2",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "ID of the Maintenance Window configuration.",
      "maxLength": 64,
      "minLength": 0
    },
    "name": {
      "type": "string",
      "description": "Name of the Maintenance Window configuration.",
      "maxLength": 256,
      "minLength": 0
    },
    "paused": {
      "type": "boolean",
      "description": "Boolean flag to determine if the Maintenance Window configuration is paused or still live."
    },
    "query": {
      "type": "string",
      "description": "Dynamic Focus Query that determines the scope of the Maintenance Window configuration.",
      "maxLength": 2048,
      "minLength": 0
    },
    "retriggerOpenAlertsEnabled": {
      "type": "boolean",
      "description": "Boolean flag to determine if we should retrigger open alerts to be sent out for any events that opened during this maintenance window, and continues to remain open after the window expires"
    },
    "scheduling": {
      "$ref": "#/$defs/MaintenanceConfigScheduling"
    },
    "tagFilterExpression": {
      "$ref": "#/$defs/TagFilterExpressionElement"
    },
    "tagFilterExpressionEnabled": {
      "type": "boolean",
      "description": "Boolean flag to determine if the tagFilterExpression is enabled."
    }
  },
  "required": [
    "id",
    "name",
    "query",
    "scheduling"
  ],
  "$defs": {
    "Duration": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "integer",
          "format": "int64",
          "minimum": 1
        },
        "unit": {
          "type": "string",
          "enum": [
            "MINUTES",
            "HOURS",
            "DAYS"
          ]
        }
      },
      "required": [
        "amount",
        "unit"
      ]
    },
    "MaintenanceConfigScheduling": {
      "type": "object",
      "description": "Time scheduling of the Maintenance Window configurations.",
      "properties": {
        "duration": {
          "$ref": "#/$defs/Duration"
        },
        "start": {
          "type": "integer",
          "format": "int64",
          "minimum": 1
        },
        "type": {
          "type": "string",
          "maxLength": 2048,
          "minLength": 0
        }
      },
      "required": [
        "duration",
        "start",
        "type"
      ]
    },
    "TagFilterExpressionElement": {
      "type": "object",
      "description": "Boolean expression of tag filters to define the scope of relevant calls.",
      "properties": {
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ]
    }
  }
}