{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-arc/json-schema/microsoft-azure-arc-setup-extension-request-schema.json",
  "title": "SetupExtensionRequest",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-arc-machineextensions-setup-api-openapi.yml#/components/schemas/SetupExtensionRequest",
  "type": "object",
  "properties": {
    "extensions": {
      "type": "array",
      "description": "The list of extensions",
      "items": {
        "$ref": "#/$defs/MachineExtensionProperties"
      }
    }
  },
  "$defs": {
    "MachineExtensionInstanceView": {
      "type": "object",
      "description": "Describes the Machine Extension Instance View.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The machine extension name."
        },
        "type": {
          "type": "string",
          "description": "Specifies the type of the extension; an example is \"CustomScriptExtension\"."
        },
        "typeHandlerVersion": {
          "type": "string",
          "description": "Specifies the version of the script handler."
        },
        "status": {
          "$ref": "#/$defs/MachineExtensionInstanceViewStatus",
          "description": "Instance view status."
        }
      }
    },
    "MachineExtensionInstanceViewStatus": {
      "type": "object",
      "description": "Instance view status.",
      "properties": {
        "code": {
          "type": "string",
          "description": "The status code."
        },
        "level": {
          "$ref": "#/$defs/StatusLevelTypes",
          "description": "The level code."
        },
        "displayStatus": {
          "type": "string",
          "description": "The short localizable label for the status."
        },
        "message": {
          "type": "string",
          "description": "The detailed status message, including for alerts and error messages."
        },
        "time": {
          "type": "string",
          "format": "date-time",
          "description": "The time of the status."
        }
      }
    },
    "MachineExtensionProperties": {
      "type": "object",
      "description": "Describes the properties of a Machine Extension.",
      "properties": {
        "forceUpdateTag": {
          "type": "string",
          "description": "How the extension handler should be forced to update even if the extension configuration has not changed."
        },
        "publisher": {
          "type": "string",
          "description": "The name of the extension handler publisher."
        },
        "type": {
          "type": "string",
          "description": "Specifies the type of the extension; an example is \"CustomScriptExtension\"."
        },
        "typeHandlerVersion": {
          "type": "string",
          "description": "Specifies the version of the script handler."
        },
        "enableAutomaticUpgrade": {
          "type": "boolean",
          "description": "Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available."
        },
        "autoUpgradeMinorVersion": {
          "type": "boolean",
          "description": "Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
        },
        "settings": {
          "type": "object",
          "description": "Json formatted public settings for the extension.",
          "additionalProperties": {}
        },
        "protectedSettings": {
          "type": "object",
          "description": "The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.",
          "additionalProperties": {}
        },
        "provisioningState": {
          "type": "string",
          "description": "The provisioning state, which only appears in the response.",
          "readOnly": true
        },
        "instanceView": {
          "$ref": "#/$defs/MachineExtensionInstanceView",
          "description": "The machine extension instance view."
        }
      }
    },
    "StatusLevelTypes": {
      "type": "string",
      "description": "The level code.",
      "enum": [
        "Info",
        "Warning",
        "Error"
      ],
      "x-ms-enum": {
        "name": "StatusLevelTypes",
        "modelAsString": true,
        "values": [
          {
            "name": "Info",
            "value": "Info",
            "description": "Info"
          },
          {
            "name": "Warning",
            "value": "Warning",
            "description": "Warning"
          },
          {
            "name": "Error",
            "value": "Error",
            "description": "Error"
          }
        ]
      }
    }
  }
}