{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-automation/json-schema/microsoft-azure-automation-watcher-schema.json",
  "title": "Watcher",
  "description": "Definition of the watcher type.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-automation-watcher-api-openapi.yml#/components/schemas/Watcher",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/WatcherProperties",
      "description": "Gets or sets the watcher properties.",
      "x-ms-client-flatten": true
    },
    "etag": {
      "type": "string",
      "description": "Gets or sets the etag of the resource."
    },
    "tags": {
      "type": "object",
      "description": "Resource tags.",
      "additionalProperties": {
        "type": "string"
      },
      "x-ms-mutability": [
        "read",
        "update",
        "create"
      ]
    },
    "location": {
      "type": "string",
      "description": "The geo-location where the resource lives",
      "x-ms-mutability": [
        "read",
        "create"
      ]
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    },
    "WatcherProperties": {
      "type": "object",
      "description": "Definition of the watcher properties",
      "properties": {
        "executionFrequencyInSeconds": {
          "type": "integer",
          "format": "int64",
          "description": "Gets or sets the frequency at which the watcher is invoked."
        },
        "scriptName": {
          "type": "string",
          "description": "Gets or sets the name of the script the watcher is attached to, i.e. the name of an existing runbook."
        },
        "scriptParameters": {
          "type": "object",
          "description": "Gets or sets the parameters of the script.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "scriptRunOn": {
          "type": "string",
          "description": "Gets or sets the name of the hybrid worker group the watcher will run on."
        },
        "status": {
          "type": "string",
          "description": "Gets the current status of the watcher.",
          "readOnly": true
        },
        "creationTime": {
          "type": "string",
          "format": "date-time",
          "description": "Gets or sets the creation time.",
          "readOnly": true
        },
        "lastModifiedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Gets or sets the last modified time.",
          "readOnly": true
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "Details of the user who last modified the watcher.",
          "readOnly": true
        },
        "description": {
          "type": "string",
          "description": "Gets or sets the description."
        }
      }
    }
  }
}