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

Adding installPatches API #11771

Merged
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
2 changes: 1 addition & 1 deletion custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ jumpbox
jwts
kafkarest
Kaliningrad
kbid
kbId
Kbps
KECA
kernelspec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3973,6 +3973,72 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches": {
"post": {
"tags": [
"VirtualMachines"
],
"operationId": "VirtualMachines_InstallPatches",
"description": "Installs patches on the VM.",
"x-ms-examples": {
"Assess patch state of a virtual machine.": {
"$ref": "./examples/VirtualMachineInstallPatches.json"
}
},
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "vmName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual machine."
},
{
"name": "installPatchesInput",
"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/VirtualMachineInstallPatchesParameters"
},
"description": "Input for InstallPatches as directly received by the API"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/VirtualMachineInstallPatchesResult"
}
},
"202": {
"description": "Accepted"
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}": {
"put": {
"tags": [
Expand Down Expand Up @@ -7814,8 +7880,9 @@
"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.\"",
"description": "The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"",
"enum": [
"Unknown",
"InProgress",
"Failed",
"Succeeded",
Expand Down Expand Up @@ -7871,6 +7938,278 @@
},
"description": "Describes the properties of an AssessPatches result."
},
"VirtualMachineInstallPatchesParameters": {
"properties": {
"maximumDuration": {
"type": "string",
"description": "Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours)"
},
"rebootSetting": {
"type": "string",
"description": "Defines when it is acceptable to reboot a VM during a software update operation.",
"enum": [
"Unknown",
"IfRequired",
"Never",
"Always"
],
"x-ms-enum": {
"name": "VMGuestPatchRebootSetting",
"modelAsString": true
}
},
"windowsParameters": {
"$ref": "#/definitions/WindowsParameters",
"description": "Input for InstallPatches on a Windows VM, as directly received by the API"
},
"linuxParameters": {
"$ref": "#/definitions/LinuxParameters",
"description": "Input for InstallPatches on a Linux VM, as directly received by the API"
}
},
"required": [
"maximumDuration",
"rebootSetting"
],
"description": "Input for InstallPatches as directly received by the API"
},
"WindowsParameters": {
"properties": {
"classificationsToInclude": {
"type": "array",
"description": "The update classifications to select when installing patches for Windows.",
"items": {
"type": "string",
"enum": [
"Unknown",
"Critical",
"Security",
"UpdateRollUp",
"FeaturePack",
"ServicePack",
"Definition",
"Tools",
"Updates"
],
"x-ms-enum": {
"name": "VMGuestPatchClassification_Windows",
"modelAsString": true
}
}
},
"kbNumbersToInclude": {
"type": "array",
"description": "Kbs to include in the patch operation",
"items": {
"type": "string"
}
},
"kbNumbersToExclude": {
"type": "array",
"description": "Kbs to exclude in the patch operation",
"items": {
"type": "string"
}
},
"excludeKbsRequiringReboot": {
"type": "boolean",
"description": "Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true."
},
"maxPatchPublishDate": {
"type": "string",
"format": "date-time",
"description": "This is used to install patches that were published on or before this given max published date."
}
},
"description": "Input for InstallPatches on a Windows VM, as directly received by the API"
},
"LinuxParameters": {
"properties": {
"classificationsToInclude": {
"type": "array",
"description": "The update classifications to select when installing patches for Linux.",
"items": {
"type": "string",
"enum": [
"Unknown",
"Critical",
"Security",
"Other"
],
"x-ms-enum": {
"name": "VMGuestPatchClassification_Linux",
"modelAsString": true
}
}
},
"packageNameMasksToInclude": {
"type": "array",
"description": "packages to include in the patch operation. Format: packageName_packageVersion",
"items": {
"type": "string"
}
},
"packageNameMasksToExclude": {
"type": "array",
"description": "packages to exclude in the patch operation. Format: packageName_packageVersion",
"items": {
"type": "string"
}
},
"maintenanceRunId": {
"type": "string",
"description": "This is used as a maintenance run identifier for Auto VM Guest Patching in Linux."
}
},
"description": "Input for InstallPatches on a Linux VM, as directly received by the API"
},
"VirtualMachineInstallPatchesResult": {
"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\", \"Unknown\" or \"CompletedWithWarnings.\"",
"enum": [
"Unknown",
"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."
},
"rebootStatus": {
"type": "string",
"readOnly": true,
"description": "The reboot state of the VM following completion of the operation.",
"enum": [
"NotNeeded",
"Required",
"Started",
"Failed",
"Completed"
],
"x-ms-enum": {
"name": "VMGuestPatchRebootStatus",
"modelAsString": true
}
},
"maintenanceWindowExceeded": {
"type": "boolean",
"readOnly": true,
"description": "Whether the operation ran out of time before it completed all its intended actions."
},
"excludedPatchCount": {
"type": "integer",
"readOnly": true,
"format": "int32",
"description": "The number of patches that were not installed due to the user blocking their installation."
},
"notSelectedPatchCount": {
"type": "integer",
"readOnly": true,
"format": "int32",
"description": "The number of patches that were detected as available for install, but did not meet the operation's criteria."
},
"pendingPatchCount": {
"type": "integer",
"readOnly": true,
"format": "int32",
"description": "The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true."
},
"installedPatchCount": {
"type": "integer",
"readOnly": true,
"format": "int32",
"description": "The number of patches successfully installed."
},
"failedPatchCount": {
"type": "integer",
"readOnly": true,
"format": "int32",
"description": "The number of patches that could not be installed due to some issue. See errors for details."
},
"patches": {
"type": "array",
"readOnly": true,
"items": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/PatchInstallationDetail"
},
"description": "The patches that were installed during the operation."
},
"startDateTime": {
"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": "The result summary of an installation operation."
},
"PatchInstallationDetail": {
"properties": {
"patchId": {
"type": "string",
"readOnly": true,
"description": "A unique identifier for the patch."
},
"name": {
"type": "string",
"readOnly": true,
"description": "The friendly name of the patch."
},
"version": {
"type": "string",
"readOnly": true,
"description": "The version string of the package. It may conform to Semantic Versioning. Only applies to Linux."
},
"kbId": {
"type": "string",
"readOnly": true,
"description": "The KBID of the patch. Only applies to Windows patches."
},
"classifications": {
"type": "array",
"readOnly": true,
"items": {
"type": "string"
},
"description": "The classification(s) of the patch as provided by the patch publisher."
},
"installationState": {
"type": "string",
"readOnly": true,
"description": "The state of the patch after the installation operation completed.",
"enum": [
"Unknown",
"Installed",
"Failed",
"Excluded",
"NotSelected",
"Pending"
],
"x-ms-enum": {
"name": "PatchInstallationState",
"modelAsString": true
}
}
},
"description": "Information about a specific patch that was encountered during an installation action."
},
"PurchasePlan": {
"properties": {
"publisher": {
Expand Down Expand Up @@ -12090,8 +12429,9 @@
"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.\"",
"description": "The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"",
"enum": [
"Unknown",
"InProgress",
"Failed",
"Succeeded",
Expand Down Expand Up @@ -12149,8 +12489,9 @@
"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.\"",
"description": "The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"",
"enum": [
"Unknown",
"InProgress",
"Failed",
"Succeeded",
Expand Down
Loading