diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json
index ef7626665076..f94f78ddc536 100644
--- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json
@@ -3091,21 +3091,27 @@
"Create a Windows vm with a patch setting patchMode of AutomaticByOS.": {
"$ref": "./examples/CreateAWindowsVmWithPatchSettingModeOfAutomaticByOS.json"
},
- "Create a Windows vm with a patch setting patchMode of AutomaticByPlatform.": {
- "$ref": "./examples/CreateAWindowsVmWithPatchSettingModeOfAutomaticByPlatform.json"
+ "Create a Windows vm with patch settings patchMode and assessmentMode set to AutomaticByPlatform.": {
+ "$ref": "./examples/CreateAWindowsVmWithPatchSettingModesOfAutomaticByPlatform.json"
},
"Create a Windows vm with a patch setting patchMode of Manual.": {
"$ref": "./examples/CreateAWindowsVmWithPatchSettingModeOfManual.json"
},
+ "Create a Windows vm with a patch setting assessmentMode of ImageDefault.": {
+ "$ref": "./examples/CreateAWindowsVmWithPatchSettingAssessmentModeOfImageDefault.json"
+ },
"Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and enableHotpatching set to true.": {
"$ref": "./examples/CreateAWindowsVmWithPatchSettingModeOfAutomaticByPlatformAndEnableHotPatchingTrue.json"
},
- "Create a Linux vm with a patch setting patchMode of AutomaticByPlatform.": {
- "$ref": "./examples/CreateALinuxVmWithPatchSettingModeOfAutomaticByPlatform.json"
+ "Create a Linux vm with a patch settings patchMode and assessmentMode set to AutomaticByPlatform.": {
+ "$ref": "./examples/CreateALinuxVmWithPatchSettingModesOfAutomaticByPlatform.json"
},
"Create a Linux vm with a patch setting patchMode of ImageDefault.": {
"$ref": "./examples/CreateALinuxVmWithPatchSettingModeOfImageDefault.json"
},
+ "Create a Linux vm with a patch setting assessmentMode of ImageDefault.": {
+ "$ref": "./examples/CreateALinuxVmWithPatchSettingAssessmentModeOfImageDefault.json"
+ },
"Create a vm with an extensions time budget.": {
"$ref": "./examples/CreateAVmWithExtensionsTimeBudget.json"
},
@@ -12578,6 +12584,18 @@
"enableHotpatching": {
"type": "boolean",
"description": "Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'."
+ },
+ "assessmentMode": {
+ "type": "string",
+ "description": "Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.
Possible values are:
**ImageDefault** - You control the timing of patch assessments on a virtual machine.
**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. ",
+ "enum": [
+ "ImageDefault",
+ "AutomaticByPlatform"
+ ],
+ "x-ms-enum": {
+ "name": "WindowsPatchAssessmentMode",
+ "modelAsString": true
+ }
}
},
"description": "Specifies settings related to VM Guest Patching on Windows."
@@ -12595,6 +12613,18 @@
"name": "LinuxVMGuestPatchMode",
"modelAsString": true
}
+ },
+ "assessmentMode": {
+ "type": "string",
+ "description": "Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.
Possible values are:
**ImageDefault** - You control the timing of patch assessments on a virtual machine.
**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.",
+ "enum": [
+ "ImageDefault",
+ "AutomaticByPlatform"
+ ],
+ "x-ms-enum": {
+ "name": "LinuxPatchAssessmentMode",
+ "modelAsString": true
+ }
}
},
"description": "Specifies settings related to VM Guest Patching on Linux."
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateALinuxVmWithPatchSettingModeOfAutomaticByPlatform.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateALinuxVmWithPatchSettingAssessmentModeOfImageDefault.json
similarity index 96%
rename from specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateALinuxVmWithPatchSettingModeOfAutomaticByPlatform.json
rename to specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateALinuxVmWithPatchSettingAssessmentModeOfImageDefault.json
index dcbeb371b0e1..dae6769a8129 100644
--- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateALinuxVmWithPatchSettingModeOfAutomaticByPlatform.json
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateALinuxVmWithPatchSettingAssessmentModeOfImageDefault.json
@@ -33,7 +33,7 @@
"linuxConfiguration": {
"provisionVMAgent": true,
"patchSettings": {
- "patchMode": "AutomaticByPlatform"
+ "assessmentMode": "ImageDefault"
}
}
},
@@ -63,7 +63,7 @@
"linuxConfiguration": {
"provisionVMAgent": true,
"patchSettings": {
- "patchMode": "AutomaticByPlatform"
+ "assessmentMode": "ImageDefault"
}
}
},
@@ -117,7 +117,7 @@
"linuxConfiguration": {
"provisionVMAgent": true,
"patchSettings": {
- "patchMode": "AutomaticByPlatform"
+ "assessmentMode": "ImageDefault"
}
}
},
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateALinuxVmWithPatchSettingModesOfAutomaticByPlatform.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateALinuxVmWithPatchSettingModesOfAutomaticByPlatform.json
new file mode 100644
index 000000000000..b6392794ed92
--- /dev/null
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateALinuxVmWithPatchSettingModesOfAutomaticByPlatform.json
@@ -0,0 +1,166 @@
+{
+ "parameters": {
+ "subscriptionId": "{subscription-id}",
+ "resourceGroupName": "myResourceGroup",
+ "vmName": "myVM",
+ "api-version": "2021-03-01",
+ "parameters": {
+ "location": "westus",
+ "properties": {
+ "hardwareProfile": {
+ "vmSize": "Standard_D2s_v3"
+ },
+ "storageProfile": {
+ "imageReference": {
+ "sku": "16.04-LTS",
+ "publisher": "Canonical",
+ "version": "latest",
+ "offer": "UbuntuServer"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Premium_LRS"
+ },
+ "name": "myVMosdisk",
+ "createOption": "FromImage"
+ }
+ },
+ "osProfile": {
+ "adminUsername": "{your-username}",
+ "computerName": "myVM",
+ "adminPassword": "{your-password}",
+ "linuxConfiguration": {
+ "provisionVMAgent": true,
+ "patchSettings": {
+ "patchMode": "AutomaticByPlatform",
+ "assessmentMode": "AutomaticByPlatform"
+ }
+ }
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
+ "properties": {
+ "primary": true
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
+ "type": "Microsoft.Compute/virtualMachines",
+ "properties": {
+ "osProfile": {
+ "adminUsername": "{your-username}",
+ "secrets": [],
+ "computerName": "myVM",
+ "linuxConfiguration": {
+ "provisionVMAgent": true,
+ "patchSettings": {
+ "patchMode": "AutomaticByPlatform",
+ "assessmentMode": "AutomaticByPlatform"
+ }
+ }
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
+ "properties": {
+ "primary": true
+ }
+ }
+ ]
+ },
+ "storageProfile": {
+ "imageReference": {
+ "sku": "16.04-LTS",
+ "publisher": "Canonical",
+ "version": "latest",
+ "offer": "UbuntuServer"
+ },
+ "osDisk": {
+ "osType": "Linux",
+ "caching": "ReadWrite",
+ "createOption": "FromImage",
+ "name": "myVMosdisk",
+ "managedDisk": {
+ "storageAccountType": "Premium_LRS"
+ }
+ },
+ "dataDisks": []
+ },
+ "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
+ "hardwareProfile": {
+ "vmSize": "Standard_D2s_v3"
+ },
+ "provisioningState": "Creating"
+ },
+ "name": "myVM",
+ "location": "westus"
+ }
+ },
+ "201": {
+ "body": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
+ "type": "Microsoft.Compute/virtualMachines",
+ "properties": {
+ "osProfile": {
+ "adminUsername": "{your-username}",
+ "secrets": [],
+ "computerName": "myVM",
+ "linuxConfiguration": {
+ "provisionVMAgent": true,
+ "patchSettings": {
+ "patchMode": "AutomaticByPlatform",
+ "assessmentMode": "AutomaticByPlatform"
+ }
+ }
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
+ "properties": {
+ "primary": true
+ }
+ }
+ ]
+ },
+ "storageProfile": {
+ "imageReference": {
+ "sku": "16.04-LTS",
+ "publisher": "Canonical",
+ "version": "latest",
+ "offer": "UbuntuServer"
+ },
+ "osDisk": {
+ "osType": "Linux",
+ "caching": "ReadWrite",
+ "createOption": "FromImage",
+ "name": "myVMosdisk",
+ "managedDisk": {
+ "storageAccountType": "Premium_LRS"
+ }
+ },
+ "dataDisks": []
+ },
+ "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
+ "hardwareProfile": {
+ "vmSize": "Standard_D2s_v3"
+ },
+ "provisioningState": "Creating"
+ },
+ "name": "myVM",
+ "location": "westus"
+ }
+ }
+ }
+}
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAWindowsVmWithPatchSettingModeOfAutomaticByPlatform.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAWindowsVmWithPatchSettingAssessmentModeOfImageDefault.json
similarity index 96%
rename from specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAWindowsVmWithPatchSettingModeOfAutomaticByPlatform.json
rename to specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAWindowsVmWithPatchSettingAssessmentModeOfImageDefault.json
index 2ffef608c72a..fcff98e4cbf8 100644
--- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAWindowsVmWithPatchSettingModeOfAutomaticByPlatform.json
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAWindowsVmWithPatchSettingAssessmentModeOfImageDefault.json
@@ -34,7 +34,7 @@
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
- "patchMode": "AutomaticByPlatform"
+ "assessmentMode": "ImageDefault"
}
}
},
@@ -65,7 +65,7 @@
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
- "patchMode": "AutomaticByPlatform"
+ "assessmentMode": "ImageDefault"
}
}
},
@@ -118,9 +118,9 @@
"computerName": "myVM",
"windowsConfiguration": {
"provisionVMAgent": true,
- "enableAutomaticUpdates": true,
+ "enableAutomaticUpdates": false,
"patchSettings": {
- "patchMode": "AutomaticByPlatform"
+ "assessmentMode": "ImageDefault"
}
}
},
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAWindowsVmWithPatchSettingModesOfAutomaticByPlatform.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAWindowsVmWithPatchSettingModesOfAutomaticByPlatform.json
new file mode 100644
index 000000000000..cfcdbaf8bd7d
--- /dev/null
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAWindowsVmWithPatchSettingModesOfAutomaticByPlatform.json
@@ -0,0 +1,169 @@
+{
+ "parameters": {
+ "subscriptionId": "{subscription-id}",
+ "resourceGroupName": "myResourceGroup",
+ "vmName": "myVM",
+ "api-version": "2021-03-01",
+ "parameters": {
+ "location": "westus",
+ "properties": {
+ "hardwareProfile": {
+ "vmSize": "Standard_D1_v2"
+ },
+ "storageProfile": {
+ "imageReference": {
+ "sku": "2016-Datacenter",
+ "publisher": "MicrosoftWindowsServer",
+ "version": "latest",
+ "offer": "WindowsServer"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Premium_LRS"
+ },
+ "name": "myVMosdisk",
+ "createOption": "FromImage"
+ }
+ },
+ "osProfile": {
+ "adminUsername": "{your-username}",
+ "computerName": "myVM",
+ "adminPassword": "{your-password}",
+ "windowsConfiguration": {
+ "provisionVMAgent": true,
+ "enableAutomaticUpdates": true,
+ "patchSettings": {
+ "patchMode": "AutomaticByPlatform",
+ "assessmentMode": "AutomaticByPlatform"
+ }
+ }
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
+ "properties": {
+ "primary": true
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
+ "type": "Microsoft.Compute/virtualMachines",
+ "properties": {
+ "osProfile": {
+ "adminUsername": "{your-username}",
+ "secrets": [],
+ "computerName": "myVM",
+ "windowsConfiguration": {
+ "provisionVMAgent": true,
+ "enableAutomaticUpdates": true,
+ "patchSettings": {
+ "patchMode": "AutomaticByPlatform",
+ "assessmentMode": "AutomaticByPlatform"
+ }
+ }
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
+ "properties": {
+ "primary": true
+ }
+ }
+ ]
+ },
+ "storageProfile": {
+ "imageReference": {
+ "sku": "2016-Datacenter",
+ "publisher": "MicrosoftWindowsServer",
+ "version": "latest",
+ "offer": "WindowsServer"
+ },
+ "osDisk": {
+ "osType": "Windows",
+ "caching": "ReadWrite",
+ "createOption": "FromImage",
+ "name": "myVMosdisk",
+ "managedDisk": {
+ "storageAccountType": "Premium_LRS"
+ }
+ },
+ "dataDisks": []
+ },
+ "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
+ "hardwareProfile": {
+ "vmSize": "Standard_DS1_v2"
+ },
+ "provisioningState": "Creating"
+ },
+ "name": "myVM",
+ "location": "westus"
+ }
+ },
+ "201": {
+ "body": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
+ "type": "Microsoft.Compute/virtualMachines",
+ "properties": {
+ "osProfile": {
+ "adminUsername": "{your-username}",
+ "secrets": [],
+ "computerName": "myVM",
+ "windowsConfiguration": {
+ "provisionVMAgent": true,
+ "enableAutomaticUpdates": true,
+ "patchSettings": {
+ "patchMode": "AutomaticByPlatform",
+ "assessmentMode": "AutomaticByPlatform"
+ }
+ }
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
+ "properties": {
+ "primary": true
+ }
+ }
+ ]
+ },
+ "storageProfile": {
+ "imageReference": {
+ "sku": "2016-Datacenter",
+ "publisher": "MicrosoftWindowsServer",
+ "version": "latest",
+ "offer": "WindowsServer"
+ },
+ "osDisk": {
+ "osType": "Windows",
+ "caching": "ReadWrite",
+ "createOption": "FromImage",
+ "name": "myVMosdisk",
+ "managedDisk": {
+ "storageAccountType": "Premium_LRS"
+ }
+ },
+ "dataDisks": []
+ },
+ "vmId": "a149cd25-409f-41af-8088-275f5486bc93",
+ "hardwareProfile": {
+ "vmSize": "Standard_DS1_v2"
+ },
+ "provisioningState": "Creating"
+ },
+ "name": "myVM",
+ "location": "westus"
+ }
+ }
+ }
+}
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetVirtualMachineInstanceView.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetVirtualMachineInstanceView.json
index 95b155357435..c28ec41f5629 100644
--- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetVirtualMachineInstanceView.json
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/GetVirtualMachineInstanceView.json
@@ -116,6 +116,12 @@
"level": "Info",
"displayStatus": "Status_PatchModeConfigurationState_Pending",
"time": "2020-04-24T21:02:04.2556154Z"
+ },
+ {
+ "code": "AssessmentModeConfigurationState/Pending",
+ "level": "Info",
+ "displayStatus": "Status_AssessmentModeConfigurationState_Pending",
+ "time": "2020-04-24T21:02:04.2556154Z"
}
]
},