Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OSProfile.WindowsConfiguration.PatchSettings.assessmentMode + Lin… #13468

Merged
merged 6 commits into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3088,21 +3088,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"
},
Expand Down Expand Up @@ -12549,6 +12555,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": {
mirichmo marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"description": "Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine.<br /><br /> **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."
Expand All @@ -12566,6 +12584,18 @@
"name": "LinuxVMGuestPatchMode",
"modelAsString": true
}
},
"assessmentMode": {
"type": "string",
"description": "Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine. <br /><br /> **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."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"linuxConfiguration": {
"provisionVMAgent": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform"
"assessmentMode": "ImageDefault"
}
}
},
Expand Down Expand Up @@ -63,7 +63,7 @@
"linuxConfiguration": {
"provisionVMAgent": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform"
"assessmentMode": "ImageDefault"
}
}
},
Expand Down Expand Up @@ -117,7 +117,7 @@
"linuxConfiguration": {
"provisionVMAgent": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform"
"assessmentMode": "ImageDefault"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform"
"assessmentMode": "ImageDefault"
}
}
},
Expand Down Expand Up @@ -65,7 +65,7 @@
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform"
"assessmentMode": "ImageDefault"
}
}
},
Expand Down Expand Up @@ -118,9 +118,9 @@
"computerName": "myVM",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"enableAutomaticUpdates": false,
"patchSettings": {
"patchMode": "AutomaticByPlatform"
"assessmentMode": "ImageDefault"
}
}
},
Expand Down
Loading