From 231a2ce2e26a7467456927065b9e04df4d3e97d4 Mon Sep 17 00:00:00 2001 From: Jemal Abdulkadir Date: Tue, 4 Aug 2020 19:35:17 -0700 Subject: [PATCH] Adding swagger change for virtual machine patching instance view (#10216) --- .../stable/2020-06-01/compute.json | 176 +++++++++++++++++- .../GetVirtualMachineInstanceView.json | 25 +++ 2 files changed, 200 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-06-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-06-01/compute.json index 0640865e3b27..f26b7788fd28 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-06-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-06-01/compute.json @@ -8892,6 +8892,10 @@ "$ref": "#/definitions/InstanceViewStatus" }, "description": "The resource status information." + }, + "patchStatus": { + "$ref": "#/definitions/VirtualMachinePatchStatus", + "description": "The status of virtual machine patch operations." } }, "description": "The instance view of a virtual machine." @@ -11549,7 +11553,7 @@ "properties": { "patchMode": { "type": "string", - "description": "Specifies the mode of in-guest patching to IaaS virtual machine.

Possible values are:

**Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

** AutomaticByPlatform** - the virtual machine will automatically updated by the OS. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true ", + "description": "Specifies the mode of in-guest patching to IaaS virtual machine.

Possible values are:

**Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

** AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true ", "enum": [ "Manual", "AutomaticByOS", @@ -11561,6 +11565,176 @@ } } } + }, + "VirtualMachinePatchStatus": { + "properties": { + "availablePatchSummary": { + "$ref": "#/definitions/AvailablePatchSummary", + "description": "The available patch summary of the latest assessment operation for the virtual machine." + }, + "lastPatchInstallationSummary": { + "$ref": "#/definitions/LastPatchInstallationSummary", + "description": "The installation summary of the latest installation operation for the virtual machine." + } + }, + "description": "The status of virtual machine patch operations." + }, + "AvailablePatchSummary": { + "properties": { + "status": { + "type": "string", + "readOnly": true, + "description": "The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"", + "enum": [ + "InProgress", + "Failed", + "Succeeded", + "CompletedWithWarnings" + ], + "x-ms-enum": { + "name": "PatchOperationStatus", + "modelAsString": true + } + }, + "assessmentActivityId": { + "type": "string", + "readOnly": true, + "description": "The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs." + }, + "rebootPending": { + "type": "boolean", + "readOnly": true, + "description": "The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred." + }, + "criticalAndSecurityPatchCount": { + "type": "integer", + "readOnly": true, + "format": "int32", + "description": "The number of critical or security patches that have been detected as available and not yet installed." + }, + "otherPatchCount": { + "type": "integer", + "readOnly": true, + "format": "int32", + "description": "The number of all available patches excluding critical and security." + }, + "startTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The UTC timestamp when the operation began." + }, + "lastModifiedTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The UTC timestamp when the operation began." + }, + "error": { + "$ref": "#/definitions/ApiError", + "readOnly": true, + "description": "The errors that were encountered during execution of the operation. The details array contains the list of them." + } + }, + "description": "Describes the properties of an virtual machine instance view for available patch summary." + }, + "LastPatchInstallationSummary": { + "properties": { + "status": { + "type": "string", + "readOnly": true, + "description": "The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"", + "enum": [ + "InProgress", + "Failed", + "Succeeded", + "CompletedWithWarnings" + ], + "x-ms-enum": { + "name": "PatchOperationStatus", + "modelAsString": true + } + }, + "installationActivityId": { + "type": "string", + "readOnly": true, + "description": "The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs." + }, + "maintenanceWindowExceeded": { + "type": "boolean", + "readOnly": true, + "description": "Describes whether the operation ran out of time before it completed all its intended actions" + }, + "rebootStatus": { + "type": "string", + "readOnly": true, + "description": "The reboot status of the machine after the patch operation. It will be in \"NotNeeded\" status if reboot is not needed after the patch operation. \"Required\" will be the status once the patch is applied and machine is required to reboot. \"Started\" will be the reboot status when the machine has started to reboot. \"Failed\" will be the status if the machine is failed to reboot. \"Completed\" will be the status once the machine is rebooted successfully", + "enum": [ + "NotNeeded", + "Required", + "Started", + "Failed", + "Completed" + ], + "x-ms-enum": { + "name": "RebootStatus", + "modelAsString": true + } + }, + "notSelectedPatchCount": { + "type": "integer", + "readOnly": true, + "format": "int32", + "description": "The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry." + }, + "excludedPatchCount": { + "type": "integer", + "readOnly": true, + "format": "int32", + "description": "The number of all available patches but excluded explicitly by a customer-specified exclusion list match." + }, + "pendingPatchCount": { + "type": "integer", + "readOnly": true, + "format": "int32", + "description": "The number of all available patches expected to be installed over the course of the patch installation operation." + }, + "installedPatchCount": { + "type": "integer", + "readOnly": true, + "format": "int32", + "description": "The count of patches that successfully installed." + }, + "failedPatchCount": { + "type": "integer", + "readOnly": true, + "format": "int32", + "description": "The count of patches that failed installation." + }, + "startTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The UTC timestamp when the operation began." + }, + "lastModifiedTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The UTC timestamp when the operation began." + }, + "startedBy": { + "type": "string", + "readOnly": true, + "description": "The person or system account that started the operation" + }, + "error": { + "$ref": "#/definitions/ApiError", + "readOnly": true, + "description": "The errors that were encountered during execution of the operation. The details array contains the list of them." + } + }, + "description": "Describes the properties of the last installed patch summary." } }, "parameters": { diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-06-01/examples/GetVirtualMachineInstanceView.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-06-01/examples/GetVirtualMachineInstanceView.json index d01a86c4c1ab..bb17b5ad0c6c 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-06-01/examples/GetVirtualMachineInstanceView.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-06-01/examples/GetVirtualMachineInstanceView.json @@ -80,6 +80,31 @@ } ], "hyperVGeneration": "V1", + "patchStatus": { + "availablePatchSummary": { + "status": "Succeeded", + "assessmentActivityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "rebootPending": true, + "criticalAndSecurityPatchCount": 1, + "otherPatchCount": 2, + "startTime": "2020-04-24T21:02:04.2556154Z", + "error": null + }, + "lastPatchInstallationSummary": { + "status": "Succeeded", + "maintenanceWindowExceeded": false, + "rebootStatus": "Completed", + "notSelectedPatchCount": 1, + "excludedPatchCount": 1, + "pendingPatchCount": 1, + "installedPatchCount": 1, + "failedPatchCount": 1, + "startTime": "2020-04-24T21:02:04.2556154Z", + "lastModifiedTime": "2020-04-24T21:02:04.2556154Z", + "startedBy": "platform", + "error": null + } + }, "statuses": [ { "code": "ProvisioningState/succeeded",