Microsoft.Compute virtualMachineScaleSets/virtualMachines/extensions

Template format

To create a Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions",
  "apiVersion": "2020-06-01",
  "location": "string",
  "tags": {},
  "properties": {
    "publisher": "string",
    "type": "string",
    "typeHandlerVersion": "string",
    "autoUpgradeMinorVersion": "boolean",
    "enableAutomaticUpgrade": "boolean",
    "settings": {},
    "protectedSettings": {},
    "instanceView": {
      "name": "string",
      "type": "string",
      "typeHandlerVersion": "string",
      "substatuses": [
        {
          "code": "string",
          "level": "string",
          "displayStatus": "string",
          "message": "string",
          "time": "string"
        }
      ],
      "statuses": [
        {
          "code": "string",
          "level": "string",
          "displayStatus": "string",
          "message": "string",
          "time": "string"
        }
      ]
    }
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions object

Name Type Required Value
name string Yes The name of the virtual machine extension.
type enum Yes extensions
-or-
Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions

See Set name and type for child resources.
apiVersion enum Yes 2020-06-01
location string Yes Resource location
tags object No Resource tags
properties object Yes VirtualMachineExtensionProperties object

VirtualMachineExtensionProperties object

Name Type Required Value
publisher string No The name of the extension handler publisher.
type string No Specifies the type of the extension; an example is "CustomScriptExtension".
typeHandlerVersion string No Specifies the version of the script handler.
autoUpgradeMinorVersion boolean No 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.
enableAutomaticUpgrade boolean No Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
settings object No Json formatted public settings for the extension.
protectedSettings object No The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
instanceView object No The virtual machine extension instance view. - VirtualMachineExtensionInstanceView object

VirtualMachineExtensionInstanceView object

Name Type Required Value
name string No The virtual machine extension name.
type string No Specifies the type of the extension; an example is "CustomScriptExtension".
typeHandlerVersion string No Specifies the version of the script handler.
substatuses array No The resource status information. - InstanceViewStatus object
statuses array No The resource status information. - InstanceViewStatus object

InstanceViewStatus object

Name Type Required Value
code string No The status code.
level enum No The level code. - Info, Warning, Error
displayStatus string No The short localizable label for the status.
message string No The detailed status message, including for alerts and error messages.
time string No The time of the status.