{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-virtual-machines/json-schema/microsoft-azure-virtual-machines-dedicated-host-update-schema.json",
  "title": "DedicatedHostUpdate",
  "description": "Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-virtual-machines-dedicatedhosts-api-openapi.yml#/components/schemas/DedicatedHostUpdate",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/DedicatedHostProperties",
      "description": "Properties of the dedicated host.",
      "x-ms-client-flatten": true
    },
    "sku": {
      "$ref": "#/$defs/Sku",
      "description": "[List all available dedicated host sizes for resizing] (https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes). Resizing can be only used to scale up DedicatedHost. Only name is required to be set."
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/UpdateResource"
    }
  ],
  "$defs": {
    "DedicatedHostAllocatableVM": {
      "type": "object",
      "description": "Represents the dedicated host unutilized capacity in terms of a specific VM size.",
      "properties": {
        "vmSize": {
          "type": "string",
          "description": "VM size in terms of which the unutilized capacity is represented."
        },
        "count": {
          "type": "number",
          "format": "double",
          "description": "Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity."
        }
      }
    },
    "DedicatedHostAvailableCapacity": {
      "type": "object",
      "description": "Dedicated host unutilized capacity.",
      "properties": {
        "allocatableVMs": {
          "type": "array",
          "description": "The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host.",
          "items": {
            "$ref": "#/$defs/DedicatedHostAllocatableVM"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "DedicatedHostInstanceView": {
      "type": "object",
      "description": "The instance view of a dedicated host.",
      "properties": {
        "assetId": {
          "type": "string",
          "description": "Specifies the unique id of the dedicated physical machine on which the dedicated host resides.",
          "readOnly": true
        },
        "availableCapacity": {
          "$ref": "#/$defs/DedicatedHostAvailableCapacity",
          "description": "Unutilized capacity of the dedicated host."
        },
        "statuses": {
          "type": "array",
          "description": "The resource status information.",
          "items": {
            "$ref": "#/$defs/InstanceViewStatus"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "DedicatedHostLicenseTypes": {
      "type": "string",
      "description": "Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**",
      "enum": [
        "None",
        "Windows_Server_Hybrid",
        "Windows_Server_Perpetual"
      ],
      "x-ms-enum": {
        "name": "DedicatedHostLicenseTypes",
        "modelAsString": false
      }
    },
    "DedicatedHostProperties": {
      "type": "object",
      "description": "Properties of the dedicated host.",
      "properties": {
        "platformFaultDomain": {
          "type": "integer",
          "format": "int32",
          "description": "Fault domain of the dedicated host within a dedicated host group."
        },
        "autoReplaceOnFailure": {
          "type": "boolean",
          "description": "Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided."
        },
        "hostId": {
          "type": "string",
          "description": "A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host.",
          "readOnly": true
        },
        "virtualMachines": {
          "type": "array",
          "description": "A list of references to all virtual machines in the Dedicated Host.",
          "items": {
            "$ref": "#/$defs/SubResourceReadOnly"
          },
          "readOnly": true
        },
        "licenseType": {
          "$ref": "#/$defs/DedicatedHostLicenseTypes",
          "description": "Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**"
        },
        "provisioningTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the host was first provisioned.",
          "readOnly": true
        },
        "provisioningState": {
          "type": "string",
          "description": "The provisioning state, which only appears in the response.",
          "readOnly": true
        },
        "instanceView": {
          "$ref": "#/$defs/DedicatedHostInstanceView",
          "description": "The dedicated host instance view.",
          "readOnly": true
        },
        "timeCreated": {
          "type": "string",
          "format": "date-time",
          "description": "Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01.",
          "readOnly": true
        }
      }
    },
    "InstanceViewStatus": {
      "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."
        }
      }
    },
    "Sku": {
      "type": "object",
      "description": "Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The sku name."
        },
        "tier": {
          "type": "string",
          "description": "Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**"
        },
        "capacity": {
          "type": "integer",
          "format": "int64",
          "description": "Specifies the number of virtual machines in the scale set."
        }
      }
    },
    "StatusLevelTypes": {
      "type": "string",
      "description": "The level code.",
      "enum": [
        "Info",
        "Warning",
        "Error"
      ],
      "x-ms-enum": {
        "name": "StatusLevelTypes",
        "modelAsString": false
      }
    },
    "SubResourceReadOnly": {
      "type": "object",
      "properties": {
        "id": {
          "readOnly": true,
          "type": "string",
          "description": "Resource Id"
        }
      }
    },
    "UpdateResource": {
      "type": "object",
      "description": "The Update Resource model definition.",
      "properties": {
        "tags": {
          "type": "object",
          "description": "Resource tags",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  }
}