{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-virtual-machines/json-schema/microsoft-azure-virtual-machines-virtual-machine-scale-set-vminstance-view-schema.json",
  "title": "VirtualMachineScaleSetVMInstanceView",
  "description": "The instance view of a virtual machine scale set VM.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-virtual-machines-compute-openapi.yml#/components/schemas/VirtualMachineScaleSetVMInstanceView",
  "type": "object",
  "properties": {
    "platformUpdateDomain": {
      "type": "integer",
      "format": "int32",
      "description": "The Update Domain count."
    },
    "platformFaultDomain": {
      "type": "integer",
      "format": "int32",
      "description": "The Fault Domain count."
    },
    "rdpThumbPrint": {
      "type": "string",
      "description": "The Remote desktop certificate thumbprint."
    },
    "vmAgent": {
      "$ref": "#/$defs/VirtualMachineAgentInstanceView"
    },
    "maintenanceRedeployStatus": {
      "$ref": "#/$defs/MaintenanceRedeployStatus"
    },
    "disks": {
      "type": "array",
      "description": "The disks information.",
      "items": {
        "$ref": "#/$defs/DiskInstanceView"
      },
      "x-ms-identifiers": [
        "name"
      ]
    },
    "extensions": {
      "type": "array",
      "description": "The extensions information.",
      "items": {
        "$ref": "#/$defs/VirtualMachineExtensionInstanceView"
      },
      "x-ms-identifiers": [
        "name",
        "type"
      ]
    },
    "vmHealth": {
      "$ref": "#/$defs/VirtualMachineHealthStatus"
    },
    "bootDiagnostics": {
      "$ref": "#/$defs/BootDiagnosticsInstanceView"
    },
    "statuses": {
      "type": "array",
      "description": "The resource status information.",
      "items": {
        "$ref": "#/$defs/InstanceViewStatus"
      },
      "x-ms-identifiers": []
    },
    "assignedHost": {
      "type": "string",
      "description": "Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01.",
      "readOnly": true
    },
    "placementGroupId": {
      "type": "string",
      "description": "The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId."
    },
    "computerName": {
      "type": "string",
      "description": "Specifies the host OS name of the virtual machine. <br><br> This name cannot be updated after the VM is created. <br><br> **Max-length (Windows):** 15 characters <br><br> **Max-length (Linux):** 64 characters. <br><br> For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://learn.microsoft.com/previous-versions/azure/virtual-machines/linux/infrastructure-example?toc=%2Fazure%2Fvirtual-machines%2Flinux%2Ftoc.json#1-naming-conventions)."
    },
    "osName": {
      "type": "string",
      "description": "The Operating System running on the hybrid machine."
    },
    "osVersion": {
      "type": "string",
      "description": "The version of Operating System running on the hybrid machine."
    },
    "hyperVGeneration": {
      "$ref": "#/$defs/Common.HyperVGeneration"
    },
    "interconnectInstanceView": {
      "$ref": "#/$defs/InterconnectInstanceView"
    },
    "capacityReservationType": {
      "$ref": "#/$defs/CapacityReservationType"
    }
  },
  "$defs": {
    "BootDiagnosticsInstanceView": {
      "type": "object",
      "description": "The instance view of a virtual machine boot diagnostics.",
      "properties": {
        "consoleScreenshotBlobUri": {
          "type": "string",
          "description": "The console screenshot blob URI. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage.",
          "readOnly": true
        },
        "serialConsoleLogBlobUri": {
          "type": "string",
          "description": "The serial console log blob Uri. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage.",
          "readOnly": true
        },
        "status": {
          "$ref": "#/$defs/InstanceViewStatus"
        }
      }
    },
    "CapacityReservationType": {
      "type": "string",
      "description": "Specifies which type of capacity reservation the virtual machine will consume capacity from if eligible or whether it is explicitly opted out from being associated and consuming capacity from any reserved capacity available in the subscription. Minimum api-version: 2026-04-01.",
      "enum": [
        "NotEligible",
        "Targeted",
        "Open",
        "Disabled",
        "Block"
      ],
      "x-ms-enum": {
        "name": "CapacityReservationType",
        "modelAsString": true,
        "values": [
          {
            "name": "NotEligible",
            "value": "NotEligible",
            "description": "The virtual machine is not eligible to be implicitly associated with an open capacity reservation and is not explicitly associated with any capacity reservation group, so it will consume capacity from the publicly available capacity."
          },
          {
            "name": "Targeted",
            "value": "Targeted",
            "description": "The virtual machine will consume capacity from a specific matching capacity reservation when associated with a capacity reservation group resource of type targeted, but can fall back to consume capacity from the publicly available capacity if there is no capacity available in the targeted reservation."
          },
          {
            "name": "Open",
            "value": "Open",
            "description": "The virtual machine if eligible will implicitly associate and consume any available capacity from a matching open capacity reservation created or shared in the subscription. **Note:** The VM should not be explicitly associated with the open capacity reservation group resource containing the matching reservation."
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "The virtual machine has capacity reservation assignment disabled and will not be allowed to implicitly or explicitly associate with any type of capacity reservation."
          },
          {
            "name": "Block",
            "value": "Block",
            "description": "The virtual machine consumes capacity from a specific matching capacity reservation when associated with a capacity reservation group resource of type block, and will hit capacity failures if there is no available capacity in the block reservation."
          }
        ]
      }
    },
    "Common.HyperVGeneration": {
      "type": "string",
      "description": "The hypervisor generation of the Virtual Machine.",
      "enum": [
        "V1",
        "V2"
      ],
      "x-ms-enum": {
        "name": "HyperVGeneration",
        "modelAsString": true,
        "values": [
          {
            "name": "V1",
            "value": "V1"
          },
          {
            "name": "V2",
            "value": "V2"
          }
        ]
      }
    },
    "DiskEncryptionSettings": {
      "type": "object",
      "description": "Describes a Encryption Settings for a Disk",
      "properties": {
        "diskEncryptionKey": {
          "$ref": "#/$defs/KeyVaultSecretReference"
        },
        "keyEncryptionKey": {
          "$ref": "#/$defs/KeyVaultKeyReference"
        },
        "enabled": {
          "type": "boolean",
          "description": "Specifies whether disk encryption should be enabled on the virtual machine."
        }
      }
    },
    "DiskInstanceView": {
      "type": "object",
      "description": "The instance view of the disk.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The disk name."
        },
        "encryptionSettings": {
          "type": "array",
          "description": "Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15",
          "items": {
            "$ref": "#/$defs/DiskEncryptionSettings"
          },
          "x-ms-identifiers": [
            "diskEncryptionKey/sourceVault/id"
          ]
        },
        "statuses": {
          "type": "array",
          "description": "The resource status information.",
          "items": {
            "$ref": "#/$defs/InstanceViewStatus"
          },
          "x-ms-identifiers": []
        },
        "storageAlignmentStatus": {
          "$ref": "#/$defs/StorageAlignmentStatus"
        }
      }
    },
    "InstanceViewStatus": {
      "type": "object",
      "description": "Instance view status.",
      "properties": {
        "code": {
          "type": "string",
          "description": "The status code."
        },
        "level": {
          "$ref": "#/$defs/StatusLevelTypes"
        },
        "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."
        }
      }
    },
    "InterconnectInstanceView": {
      "type": "object",
      "description": "The Interconnect Block instance view details for a Virtual Machine or Scale Set VM instance.",
      "properties": {
        "interconnectSubgroupId": {
          "type": "string",
          "description": "The ID (GUID) of the Interconnect subgroup in which the Virtual Machine was placed.",
          "readOnly": true
        }
      }
    },
    "KeyVaultKeyReference": {
      "type": "object",
      "description": "Describes a reference to Key Vault Key",
      "properties": {
        "keyUrl": {
          "type": "string",
          "description": "The URL referencing a key encryption key in Key Vault."
        },
        "sourceVault": {
          "$ref": "../../common-types/v1/common.json#/definitions/SubResource"
        }
      },
      "required": [
        "keyUrl",
        "sourceVault"
      ]
    },
    "KeyVaultSecretReference": {
      "type": "object",
      "description": "Describes a reference to Key Vault Secret",
      "properties": {
        "secretUrl": {
          "type": "string",
          "description": "The URL referencing a secret in a Key Vault."
        },
        "sourceVault": {
          "$ref": "../../common-types/v1/common.json#/definitions/SubResource"
        }
      },
      "required": [
        "secretUrl",
        "sourceVault"
      ]
    },
    "MaintenanceOperationResultCodeTypes": {
      "type": "string",
      "description": "The Last Maintenance Operation Result Code.",
      "enum": [
        "None",
        "RetryLater",
        "MaintenanceAborted",
        "MaintenanceCompleted"
      ],
      "x-ms-enum": {
        "name": "MaintenanceOperationResultCodeTypes",
        "modelAsString": false
      }
    },
    "MaintenanceRedeployStatus": {
      "type": "object",
      "description": "Maintenance Operation Status.",
      "properties": {
        "isCustomerInitiatedMaintenanceAllowed": {
          "type": "boolean",
          "description": "True, if customer is allowed to perform Maintenance."
        },
        "preMaintenanceWindowStartTime": {
          "type": "string",
          "format": "date-time",
          "description": "Start Time for the Pre Maintenance Window."
        },
        "preMaintenanceWindowEndTime": {
          "type": "string",
          "format": "date-time",
          "description": "End Time for the Pre Maintenance Window."
        },
        "maintenanceWindowStartTime": {
          "type": "string",
          "format": "date-time",
          "description": "Start Time for the Maintenance Window."
        },
        "maintenanceWindowEndTime": {
          "type": "string",
          "format": "date-time",
          "description": "End Time for the Maintenance Window."
        },
        "lastOperationResultCode": {
          "$ref": "#/$defs/MaintenanceOperationResultCodeTypes"
        },
        "lastOperationMessage": {
          "type": "string",
          "description": "Message returned for the last Maintenance Operation."
        }
      }
    },
    "StatusLevelTypes": {
      "type": "string",
      "description": "The level code.",
      "enum": [
        "Info",
        "Warning",
        "Error"
      ],
      "x-ms-enum": {
        "name": "StatusLevelTypes",
        "modelAsString": false
      }
    },
    "StorageAlignmentStatus": {
      "type": "string",
      "description": "Specifies the storage alignment status for the disk.",
      "enum": [
        "Unaligned",
        "Aligned"
      ],
      "x-ms-enum": {
        "name": "StorageAlignmentStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Unaligned",
            "value": "Unaligned",
            "description": "Disk does not have Storage Fault Domain to Compute Fault Domain mapping. A single Storage Fault Domain failure may impact all VMs that reference this disk profile."
          },
          {
            "name": "Aligned",
            "value": "Aligned",
            "description": "Disk has Storage Fault Domain to Compute Fault Domain mapping. Storage Fault Domain failure is contained to VMs in a single Compute Fault Domain."
          }
        ]
      }
    },
    "VirtualMachineAgentInstanceView": {
      "type": "object",
      "description": "The instance view of the VM Agent running on the virtual machine.",
      "properties": {
        "vmAgentVersion": {
          "type": "string",
          "description": "The VM Agent full version."
        },
        "extensionHandlers": {
          "type": "array",
          "description": "The virtual machine extension handler instance view.",
          "items": {
            "$ref": "#/$defs/VirtualMachineExtensionHandlerInstanceView"
          },
          "x-ms-identifiers": []
        },
        "statuses": {
          "type": "array",
          "description": "The resource status information.",
          "items": {
            "$ref": "#/$defs/InstanceViewStatus"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "VirtualMachineExtensionHandlerInstanceView": {
      "type": "object",
      "description": "The instance view of a virtual machine extension handler.",
      "properties": {
        "type": {
          "type": "string",
          "description": "Specifies the type of the extension; an example is \"CustomScriptExtension\"."
        },
        "typeHandlerVersion": {
          "type": "string",
          "description": "Specifies the Major.Minor.Patch.Hotfix version of the script handler. Azure platform will deliver the latest Patch.Hotfix version in the Major.Minor series."
        },
        "status": {
          "$ref": "#/$defs/InstanceViewStatus"
        }
      }
    },
    "VirtualMachineExtensionInstanceView": {
      "type": "object",
      "description": "The instance view of a virtual machine extension.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The virtual machine extension name."
        },
        "type": {
          "type": "string",
          "description": "Specifies the type of the extension; an example is \"CustomScriptExtension\"."
        },
        "typeHandlerVersion": {
          "type": "string",
          "description": "Specifies the Major.Minor.Patch.Hotfix version of the script handler. Azure platform will deliver the latest Patch.Hotfix version in the Major.Minor series."
        },
        "substatuses": {
          "type": "array",
          "description": "The resource status information.",
          "items": {
            "$ref": "#/$defs/InstanceViewStatus"
          },
          "x-ms-identifiers": []
        },
        "statuses": {
          "type": "array",
          "description": "The resource status information.",
          "items": {
            "$ref": "#/$defs/InstanceViewStatus"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "VirtualMachineHealthStatus": {
      "type": "object",
      "description": "The health status of the VM.",
      "properties": {
        "status": {
          "$ref": "#/$defs/InstanceViewStatus"
        }
      }
    }
  }
}