Class PatchSettings

java.lang.Object
com.azure.resourcemanager.compute.models.PatchSettings
All Implemented Interfaces:
com.azure.json.JsonSerializable<PatchSettings>

public final class PatchSettings extends Object implements com.azure.json.JsonSerializable<PatchSettings>
Specifies settings related to VM Guest Patching on Windows.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of PatchSettings class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the assessmentMode property: 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.
    Get the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.
    Get the enableHotpatching property: Enables customers to patch their Azure VMs without requiring a reboot.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of PatchSettings from the JsonReader.
    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.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the assessmentMode property: 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.
    Set the automaticByPlatformSettings property: Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.
    withEnableHotpatching(Boolean enableHotpatching)
    Set the enableHotpatching property: Enables customers to patch their Azure VMs without requiring a reboot.
    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.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • PatchSettings

      public PatchSettings()
      Creates an instance of PatchSettings class.
  • Method Details

    • 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.<br /><br /> Possible values are:<br /><br /> **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<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true.
      Returns:
      the patchMode value.
    • 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.<br /><br /> Possible values are:<br /><br /> **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<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> **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.
    • 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.
    • 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.
    • assessmentMode

      public WindowsPatchAssessmentMode assessmentMode()
      Get the assessmentMode property: 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.
      Returns:
      the assessmentMode value.
    • withAssessmentMode

      public PatchSettings withAssessmentMode(WindowsPatchAssessmentMode assessmentMode)
      Set the assessmentMode property: 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.
      Parameters:
      assessmentMode - the assessmentMode value to set.
      Returns:
      the PatchSettings object itself.
    • 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.
    • 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.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<PatchSettings>
      Throws:
      IOException
    • fromJson

      public static PatchSettings fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.