{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "url": {
      "title": "URL to check",
      "description": "URL to check, like https://example.com/",
      "type": "string"
    },
    "region-dict": {
      "title": "Applicable Regions",
      "description": "Puts the check on the defined regions. No definition will result with presence in all regions.",
      "patternProperties": {
        ".*": {
          "properties": {
            "state": {
              "title": "State",
              "description": "State of the check of the region. Used only to make it correctly visible in the SlapOS Master UI if no other parameters are defined.",
              "type": "string",
              "default": "present",
              "enum": [
                "present"
              ]
            },
            "check-frontend-ip-list": {
              "default": [],
              "title": "Frontend IPs to check",
              "description": "List of default frontend IPs to check, if empty no constraint is used. Defaults to region configuration.",
              "type": "array"
            }
          },
          "type": "object"
        }
      },
      "type": "object",
      "default": {}
    },
    "check-status-code": {
      "title": "HTTP Code Check",
      "description": "Expected response HTTP Code.",
      "type": "number",
      "default": 200,
      "minimum": 100,
      "maximum": 599
    },
    "check-certificate-expiration-days": {
      "title": "Certificate Expiration Check (days)",
      "description": "Amount of days to consider certificate as being to-be-expired.",
      "type": "number",
      "default": 15,
      "minimum": 1
    },
    "check-maximum-elapsed-time": {
      "title": "Maximum Elapsed Check (seconds)",
      "description": "Maximum elapsed time for a site to reply to be considered good.",
      "type": "number",
      "default": 2,
      "minimum": 1
    },
    "check-http-header-dict": {
      "title": "HTTP Header Check",
      "description": "JSON object of expected HTTP header, like {\"Cache-Control\": \"max-age=3600, public\", \"Vary\": \"Accept-Encoding\"}. Note: Shall be expressed directly as object, without any additional qouting.",
      "type": "object",
      "default": {}
    },
    "failure-amount": {
      "title": "Failure Amount",
      "description": "Amount of failures to consider URL as in bad state, can be set to higher value for endpoints with accepted short outages.",
      "type": "number",
      "default": 2,
      "minimum": 1
    },
    "check-frontend-ip-list": {
      "title": "Frontend IPs to check (backward compatibility)",
      "description": "List of Frontend IPs to check, if empty no constraint is used. Defaults to region configuration. Note: Use region-dict's check-frontend-ip-list to ensure specific check on each region.",
      "type": "array"
    }
  }
}