PatchSettings Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.PatchSettings

Implements

public final class PatchSettings
implements JsonSerializable<PatchSettings>

Specifies settings related to VM Guest Patching on Windows.

Constructor Summary

Constructor Description
PatchSettings()

Creates an instance of PatchSettings class.

Method Summary

Modifier and Type Method and Description
WindowsPatchAssessmentMode assessmentMode()

Get the assessmentMode property: 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.

WindowsVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings()

Get the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.

Boolean enableHotpatching()

Get the enableHotpatching property: Enables customers to patch their Azure VMs without requiring a reboot.

static PatchSettings fromJson(JsonReader jsonReader)

Reads an instance of PatchSettings from the JsonReader.

WindowsVMGuestPatchMode patchMode()

Get the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

Possible values are:

**Manual** - You control the application of patches to a virtual machine.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

PatchSettings withAssessmentMode(WindowsPatchAssessmentMode assessmentMode)

Set the assessmentMode property: 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.

PatchSettings withAutomaticByPlatformSettings(WindowsVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings)

Set the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.

PatchSettings withEnableHotpatching(Boolean enableHotpatching)

Set the enableHotpatching property: Enables customers to patch their Azure VMs without requiring a reboot.

PatchSettings withPatchMode(WindowsVMGuestPatchMode patchMode)

Set the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

Possible values are:

**Manual** - You control the application of patches to a virtual machine.

Methods inherited from java.lang.Object

Constructor Details

PatchSettings

public PatchSettings()

Creates an instance of PatchSettings class.

Method Details

assessmentMode

public WindowsPatchAssessmentMode assessmentMode()

Get the assessmentMode property: 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.

Returns:

the assessmentMode value.

automaticByPlatformSettings

public WindowsVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings()

Get the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.

Returns:

the automaticByPlatformSettings value.

enableHotpatching

public Boolean enableHotpatching()

Get the enableHotpatching property: 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'.

Returns:

the enableHotpatching value.

fromJson

public static PatchSettings fromJson(JsonReader jsonReader)

Reads an instance of PatchSettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of PatchSettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the PatchSettings.

patchMode

public WindowsVMGuestPatchMode patchMode()

Get the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

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.

Returns:

the patchMode value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAssessmentMode

public PatchSettings withAssessmentMode(WindowsPatchAssessmentMode assessmentMode)

Set the assessmentMode property: 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.

Parameters:

assessmentMode - the assessmentMode value to set.

Returns:

the PatchSettings object itself.

withAutomaticByPlatformSettings

public PatchSettings withAutomaticByPlatformSettings(WindowsVMGuestPatchAutomaticByPlatformSettings automaticByPlatformSettings)

Set the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.

Parameters:

automaticByPlatformSettings - the automaticByPlatformSettings value to set.

Returns:

the PatchSettings object itself.

withEnableHotpatching

public PatchSettings withEnableHotpatching(Boolean enableHotpatching)

Set the enableHotpatching property: 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'.

Parameters:

enableHotpatching - the enableHotpatching value to set.

Returns:

the PatchSettings object itself.

withPatchMode

public PatchSettings withPatchMode(WindowsVMGuestPatchMode patchMode)

Set the patchMode property: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

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.

Parameters:

patchMode - the patchMode value to set.

Returns:

the PatchSettings object itself.

Applies to