{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-virtual-machines/json-schema/microsoft-azure-virtual-machines-run-command-document-schema.json",
  "title": "RunCommandDocument",
  "description": "Describes the properties of a Run Command.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-virtual-machines-virtualmachineruncommands-api-openapi.yml#/components/schemas/RunCommandDocument",
  "type": "object",
  "properties": {
    "script": {
      "type": "array",
      "description": "The script to be executed.",
      "items": {
        "type": "string"
      }
    },
    "parameters": {
      "type": "array",
      "description": "The parameters used by the script.",
      "items": {
        "$ref": "#/$defs/RunCommandParameterDefinition"
      },
      "x-ms-identifiers": [
        "name",
        "type"
      ]
    }
  },
  "required": [
    "script"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/RunCommandDocumentBase"
    }
  ],
  "$defs": {
    "Common.OperatingSystemTypes": {
      "type": "string",
      "description": "This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**",
      "enum": [
        "Windows",
        "Linux"
      ],
      "x-ms-enum": {
        "name": "OperatingSystemTypes",
        "modelAsString": false
      }
    },
    "RunCommandDocumentBase": {
      "type": "object",
      "description": "Describes the properties of a Run Command metadata.",
      "properties": {
        "$schema": {
          "type": "string",
          "description": "The VM run command schema.",
          "x-ms-client-name": "schema"
        },
        "id": {
          "type": "string",
          "description": "The VM run command id."
        },
        "osType": {
          "$ref": "#/$defs/Common.OperatingSystemTypes",
          "description": "The Operating System type."
        },
        "label": {
          "type": "string",
          "description": "The VM run command label."
        },
        "description": {
          "type": "string",
          "description": "The VM run command description."
        }
      },
      "required": [
        "$schema",
        "id",
        "osType",
        "label",
        "description"
      ]
    },
    "RunCommandParameterDefinition": {
      "type": "object",
      "description": "Describes the properties of a run command parameter.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The run command parameter name."
        },
        "type": {
          "type": "string",
          "description": "The run command parameter type."
        },
        "defaultValue": {
          "type": "string",
          "description": "The run command parameter default value."
        },
        "required": {
          "type": "boolean",
          "description": "The run command parameter required."
        }
      },
      "required": [
        "name",
        "type"
      ]
    }
  }
}