{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-arc/json-schema/microsoft-azure-arc-machine-update-schema.json",
  "title": "MachineUpdate",
  "description": "Describes a hybrid machine Update.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-arc-machines-api-openapi.yml#/components/schemas/MachineUpdate",
  "type": "object",
  "properties": {
    "identity": {
      "$ref": "#/$defs/ManagedServiceIdentity",
      "description": "Identity for the resource."
    },
    "kind": {
      "$ref": "#/$defs/ArcKindEnum",
      "description": "Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc."
    },
    "properties": {
      "$ref": "#/$defs/MachineUpdateProperties",
      "description": "Hybrid Compute Machine properties",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ResourceUpdate"
    }
  ],
  "$defs": {
    "AgentUpgrade": {
      "type": "object",
      "description": "The info w.r.t Agent Upgrade.",
      "properties": {
        "desiredVersion": {
          "type": "string",
          "description": "Specifies the version info w.r.t AgentUpgrade for the machine."
        },
        "correlationId": {
          "type": "string",
          "format": "uuid",
          "description": "The correlation ID associated with an agent upgrade operation."
        },
        "enableAutomaticUpgrade": {
          "type": "boolean",
          "description": "Specifies if the machine's agent should be upgraded"
        },
        "lastAttemptDesiredVersion": {
          "type": "string",
          "description": "Specifies the version of the last attempt",
          "readOnly": true
        },
        "lastAttemptTimestamp": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp of last upgrade attempt",
          "readOnly": true
        },
        "lastAttemptStatus": {
          "$ref": "#/$defs/LastAttemptStatusEnum",
          "description": "Specifies the status of Agent Upgrade.",
          "readOnly": true
        },
        "lastAttemptMessage": {
          "type": "string",
          "description": "Failure message of last upgrade attempt if any.",
          "readOnly": true
        }
      }
    },
    "ArcKindEnum": {
      "type": "string",
      "description": "Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc.",
      "enum": [
        "AVS",
        "HCI",
        "SCVMM",
        "VMware",
        "EPS",
        "GCP",
        "AWS"
      ],
      "x-ms-enum": {
        "name": "ArcKindEnum",
        "modelAsString": true,
        "values": [
          {
            "name": "AVS",
            "value": "AVS",
            "description": "AVS"
          },
          {
            "name": "HCI",
            "value": "HCI",
            "description": "HCI"
          },
          {
            "name": "SCVMM",
            "value": "SCVMM",
            "description": "SCVMM"
          },
          {
            "name": "VMware",
            "value": "VMware",
            "description": "VMware"
          },
          {
            "name": "EPS",
            "value": "EPS",
            "description": "EPS"
          },
          {
            "name": "GCP",
            "value": "GCP",
            "description": "GCP"
          },
          {
            "name": "AWS",
            "value": "AWS",
            "description": "AWS"
          }
        ]
      }
    },
    "AssessmentModeTypes": {
      "type": "string",
      "description": "Specifies the assessment mode.",
      "enum": [
        "ImageDefault",
        "AutomaticByPlatform"
      ],
      "x-ms-enum": {
        "name": "AssessmentModeTypes",
        "modelAsString": true,
        "values": [
          {
            "name": "ImageDefault",
            "value": "ImageDefault",
            "description": "ImageDefault"
          },
          {
            "name": "AutomaticByPlatform",
            "value": "AutomaticByPlatform",
            "description": "AutomaticByPlatform"
          }
        ]
      }
    },
    "CloudMetadata": {
      "type": "object",
      "description": "The metadata of the cloud environment (Azure/GCP/AWS/OCI...).",
      "properties": {
        "provider": {
          "type": "string",
          "description": "Specifies the cloud provider (Azure/AWS/GCP...).",
          "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": []
        }
      }
    },
    "HotpatchEnablementStatus": {
      "type": "string",
      "description": "Status of hotpatch enablement or disablement.",
      "enum": [
        "Unknown",
        "PendingEvaluation",
        "Disabled",
        "ActionRequired",
        "Enabled"
      ],
      "x-ms-enum": {
        "name": "HotpatchEnablementStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown"
          },
          {
            "name": "PendingEvaluation",
            "value": "PendingEvaluation",
            "description": "PendingEvaluation"
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Disabled"
          },
          {
            "name": "ActionRequired",
            "value": "ActionRequired",
            "description": "ActionRequired"
          },
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Enabled"
          }
        ]
      }
    },
    "LastAttemptStatusEnum": {
      "type": "string",
      "description": "Specifies the status of Agent Upgrade.",
      "enum": [
        "Success",
        "Failed"
      ],
      "x-ms-enum": {
        "name": "LastAttemptStatusEnum",
        "modelAsString": true,
        "values": [
          {
            "name": "Success",
            "value": "Success",
            "description": "Success"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          }
        ]
      }
    },
    "MachineUpdateProperties": {
      "type": "object",
      "description": "Describes the ARM updatable properties of a hybrid machine.",
      "properties": {
        "locationData": {
          "$ref": "#/$defs/locationData",
          "description": "Metadata pertaining to the geographic location of the resource."
        },
        "osProfile": {
          "$ref": "#/$defs/OSProfile",
          "description": "Specifies the operating system settings for the hybrid machine."
        },
        "cloudMetadata": {
          "$ref": "#/$defs/CloudMetadata",
          "description": "The metadata of the cloud environment (Azure/GCP/AWS/OCI...)."
        },
        "agentUpgrade": {
          "$ref": "#/$defs/AgentUpgrade",
          "description": "The info of the machine w.r.t Agent Upgrade"
        },
        "parentClusterResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any."
        },
        "privateLinkScopeResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "The resource id of the private link scope this machine is assigned to, if any."
        },
        "identityKeyStore": {
          "type": "string",
          "description": "Identity key store type of the machine"
        },
        "tpmEkCertificate": {
          "type": "string",
          "description": "Endorsement Key Certificate of the Trusted Platform Module (TPM) that the client provides to be used during initial resource onboarding."
        },
        "clientPublicKey": {
          "type": "string",
          "description": "Public Key that the client provides to be used during initial resource onboarding"
        }
      }
    },
    "ManagedServiceIdentity": {
      "type": "object",
      "description": "Managed service identity (system assigned and/or user assigned identities)",
      "properties": {
        "principalId": {
          "type": "string",
          "format": "uuid",
          "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "tenantId": {
          "type": "string",
          "format": "uuid",
          "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/ManagedServiceIdentityType"
        },
        "userAssignedIdentities": {
          "type": "object",
          "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.",
          "additionalProperties": {
            "$ref": "#/$defs/UserAssignedIdentity"
          }
        }
      },
      "required": [
        "type"
      ]
    },
    "OSProfile": {
      "type": "object",
      "description": "Specifies the operating system settings for the hybrid machine.",
      "properties": {
        "computerName": {
          "type": "string",
          "description": "Specifies the host OS name of the hybrid machine.",
          "readOnly": true
        },
        "windowsConfiguration": {
          "$ref": "#/$defs/OSProfileWindowsConfiguration",
          "description": "Specifies the windows configuration for update management."
        },
        "linuxConfiguration": {
          "$ref": "#/$defs/OSProfileLinuxConfiguration",
          "description": "Specifies the linux configuration for update management."
        }
      }
    },
    "OSProfileLinuxConfiguration": {
      "type": "object",
      "description": "Specifies the linux configuration for update management.",
      "properties": {
        "patchSettings": {
          "$ref": "#/$defs/PatchSettings",
          "description": "Specifies the patch settings.",
          "x-ms-client-flatten": true
        }
      }
    },
    "OSProfileWindowsConfiguration": {
      "type": "object",
      "description": "Specifies the windows configuration for update management.",
      "properties": {
        "patchSettings": {
          "$ref": "#/$defs/PatchSettings",
          "description": "Specifies the patch settings.",
          "x-ms-client-flatten": true
        }
      }
    },
    "PatchModeTypes": {
      "type": "string",
      "description": "Specifies the patch mode.",
      "enum": [
        "ImageDefault",
        "AutomaticByPlatform",
        "AutomaticByOS",
        "Manual"
      ],
      "x-ms-enum": {
        "name": "PatchModeTypes",
        "modelAsString": true,
        "values": [
          {
            "name": "ImageDefault",
            "value": "ImageDefault",
            "description": "ImageDefault"
          },
          {
            "name": "AutomaticByPlatform",
            "value": "AutomaticByPlatform",
            "description": "AutomaticByPlatform"
          },
          {
            "name": "AutomaticByOS",
            "value": "AutomaticByOS",
            "description": "AutomaticByOS"
          },
          {
            "name": "Manual",
            "value": "Manual",
            "description": "Manual"
          }
        ]
      }
    },
    "PatchSettings": {
      "type": "object",
      "description": "Specifies the patch settings.",
      "properties": {
        "assessmentMode": {
          "$ref": "#/$defs/AssessmentModeTypes",
          "description": "Specifies the assessment mode."
        },
        "patchMode": {
          "$ref": "#/$defs/PatchModeTypes",
          "description": "Specifies the patch mode."
        },
        "enableHotpatching": {
          "type": "boolean",
          "description": "Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot."
        },
        "status": {
          "$ref": "#/$defs/PatchSettingsStatus",
          "description": "Status of the hotpatch capability enrollment or disenrollment.",
          "readOnly": true
        }
      }
    },
    "PatchSettingsStatus": {
      "type": "object",
      "description": "Status of the hotpatch capability enrollment or disenrollment.",
      "properties": {
        "hotpatchEnablementStatus": {
          "$ref": "#/$defs/HotpatchEnablementStatus",
          "description": "Indicates the current status of the hotpatch being enabled or disabled."
        },
        "error": {
          "$ref": "#/$defs/ErrorDetail",
          "description": "The errors that were encountered during the hotpatch capability enrollment or disenrollment.",
          "readOnly": true
        }
      }
    },
    "ResourceUpdate": {
      "type": "object",
      "description": "The Update Resource model definition.",
      "properties": {
        "tags": {
          "type": "object",
          "description": "Resource tags",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "locationData": {
      "type": "object",
      "description": "Metadata pertaining to the geographic location of the resource.",
      "properties": {
        "name": {
          "type": "string",
          "description": "A canonical name for the geographic or physical location.",
          "maxLength": 256
        },
        "city": {
          "type": "string",
          "description": "The city or locality where the resource is located."
        },
        "district": {
          "type": "string",
          "description": "The district, state, or province where the resource is located."
        },
        "countryOrRegion": {
          "type": "string",
          "description": "The country or region where the resource is located"
        }
      },
      "required": [
        "name"
      ]
    }
  }
}