{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-arc/json-schema/microsoft-azure-arc-machine-install-patches-result-schema.json",
  "title": "MachineInstallPatchesResult",
  "description": "The result summary of an installation operation.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-arc-hybridcompute-openapi.yml#/components/schemas/MachineInstallPatchesResult",
  "type": "object",
  "properties": {
    "status": {
      "$ref": "#/$defs/PatchOperationStatus"
    },
    "installationActivityId": {
      "type": "string",
      "description": "The activity ID of the operation that produced this result.",
      "readOnly": true
    },
    "rebootStatus": {
      "$ref": "#/$defs/VMGuestPatchRebootStatus"
    },
    "maintenanceWindowExceeded": {
      "type": "boolean",
      "description": "Whether the operation ran out of time before it completed all its intended actions.",
      "readOnly": true
    },
    "excludedPatchCount": {
      "type": "integer",
      "format": "int32",
      "description": "The number of patches that were not installed due to the user blocking their installation.",
      "readOnly": true
    },
    "notSelectedPatchCount": {
      "type": "integer",
      "format": "int32",
      "description": "The number of patches that were detected as available for install, but did not meet the operation's criteria.",
      "readOnly": true
    },
    "pendingPatchCount": {
      "type": "integer",
      "format": "int32",
      "description": "The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true.",
      "readOnly": true
    },
    "installedPatchCount": {
      "type": "integer",
      "format": "int32",
      "description": "The number of patches successfully installed.",
      "readOnly": true
    },
    "failedPatchCount": {
      "type": "integer",
      "format": "int32",
      "description": "The number of patches that could not be installed due to some issue. See errors for details.",
      "readOnly": true
    },
    "startDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "The UTC timestamp when the operation began.",
      "readOnly": true
    },
    "lastModifiedDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "The UTC timestamp when the operation finished.",
      "readOnly": true
    },
    "startedBy": {
      "$ref": "#/$defs/PatchOperationStartedBy"
    },
    "patchServiceUsed": {
      "$ref": "#/$defs/PatchServiceUsed"
    },
    "osType": {
      "$ref": "#/$defs/OsType"
    },
    "errorDetails": {
      "$ref": "#/$defs/ErrorDetail"
    }
  },
  "$defs": {
    "ErrorAdditionalInfo": {
      "type": "object",
      "description": "The resource management error additional info.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The additional info type.",
          "readOnly": true
        },
        "info": {
          "type": "object",
          "description": "The additional info.",
          "readOnly": true
        }
      }
    },
    "ErrorDetail": {
      "type": "object",
      "description": "The error detail.",
      "properties": {
        "code": {
          "type": "string",
          "description": "The error code.",
          "readOnly": true
        },
        "message": {
          "type": "string",
          "description": "The error message.",
          "readOnly": true
        },
        "target": {
          "type": "string",
          "description": "The error target.",
          "readOnly": true
        },
        "details": {
          "type": "array",
          "description": "The error details.",
          "items": {
            "$ref": "#/$defs/ErrorDetail"
          },
          "readOnly": true,
          "x-ms-identifiers": [
            "message",
            "target"
          ]
        },
        "additionalInfo": {
          "type": "array",
          "description": "The error additional info.",
          "items": {
            "$ref": "#/$defs/ErrorAdditionalInfo"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        }
      }
    },
    "OsType": {
      "type": "string",
      "description": "The operating system type of the machine.",
      "enum": [
        "Windows",
        "Linux"
      ],
      "x-ms-enum": {
        "name": "OsType",
        "modelAsString": true,
        "values": [
          {
            "name": "Windows",
            "value": "Windows",
            "description": "Windows"
          },
          {
            "name": "Linux",
            "value": "Linux",
            "description": "Linux"
          }
        ]
      }
    },
    "PatchOperationStartedBy": {
      "type": "string",
      "description": "Indicates if operation was triggered by user or by platform.",
      "enum": [
        "User",
        "Platform"
      ],
      "x-ms-enum": {
        "name": "PatchOperationStartedBy",
        "modelAsString": true,
        "values": [
          {
            "name": "User",
            "value": "User",
            "description": "User"
          },
          {
            "name": "Platform",
            "value": "Platform",
            "description": "Platform"
          }
        ]
      }
    },
    "PatchOperationStatus": {
      "type": "string",
      "description": "The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"",
      "enum": [
        "Unknown",
        "InProgress",
        "Failed",
        "Succeeded",
        "CompletedWithWarnings"
      ],
      "x-ms-enum": {
        "name": "PatchOperationStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown"
          },
          {
            "name": "InProgress",
            "value": "InProgress",
            "description": "InProgress"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "CompletedWithWarnings",
            "value": "CompletedWithWarnings",
            "description": "CompletedWithWarnings"
          }
        ]
      }
    },
    "PatchServiceUsed": {
      "type": "string",
      "description": "Specifies the patch service used for the operation.",
      "enum": [
        "Unknown",
        "WU",
        "WU_WSUS",
        "YUM",
        "APT",
        "Zypper"
      ],
      "x-ms-enum": {
        "name": "PatchServiceUsed",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown"
          },
          {
            "name": "WU",
            "value": "WU",
            "description": "WU"
          },
          {
            "name": "WU_WSUS",
            "value": "WU_WSUS",
            "description": "WU_WSUS"
          },
          {
            "name": "YUM",
            "value": "YUM",
            "description": "YUM"
          },
          {
            "name": "APT",
            "value": "APT",
            "description": "APT"
          },
          {
            "name": "Zypper",
            "value": "Zypper",
            "description": "Zypper"
          }
        ]
      }
    },
    "VMGuestPatchRebootStatus": {
      "type": "string",
      "description": "The reboot state of the VM following completion of the operation.",
      "enum": [
        "Unknown",
        "NotNeeded",
        "Required",
        "Started",
        "Failed",
        "Completed"
      ],
      "x-ms-enum": {
        "name": "VMGuestPatchRebootStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown"
          },
          {
            "name": "NotNeeded",
            "value": "NotNeeded",
            "description": "NotNeeded"
          },
          {
            "name": "Required",
            "value": "Required",
            "description": "Required"
          },
          {
            "name": "Started",
            "value": "Started",
            "description": "Started"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Completed",
            "value": "Completed",
            "description": "Completed"
          }
        ]
      }
    }
  }
}