Class AutomaticOsUpgradePolicy

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

public final class AutomaticOsUpgradePolicy extends Object implements com.azure.json.JsonSerializable<AutomaticOsUpgradePolicy>
The configuration parameters used for performing automatic OS upgrade.
  • Constructor Details

    • AutomaticOsUpgradePolicy

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

    • isDisableAutomaticRollback

      public Boolean isDisableAutomaticRollback()
      Get the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.
      Returns:
      the disableAutomaticRollback value.
    • setDisableAutomaticRollback

      public AutomaticOsUpgradePolicy setDisableAutomaticRollback(Boolean disableAutomaticRollback)
      Set the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.
      Parameters:
      disableAutomaticRollback - the disableAutomaticRollback value to set.
      Returns:
      the AutomaticOsUpgradePolicy object itself.
    • isEnableAutomaticOsUpgrade

      public Boolean isEnableAutomaticOsUpgrade()
      Get the enableAutomaticOsUpgrade property: Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true.
      Returns:
      the enableAutomaticOsUpgrade value.
    • setEnableAutomaticOsUpgrade

      public AutomaticOsUpgradePolicy setEnableAutomaticOsUpgrade(Boolean enableAutomaticOsUpgrade)
      Set the enableAutomaticOsUpgrade property: Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true.
      Parameters:
      enableAutomaticOsUpgrade - the enableAutomaticOsUpgrade value to set.
      Returns:
      the AutomaticOsUpgradePolicy object itself.
    • isUseRollingUpgradePolicy

      public Boolean isUseRollingUpgradePolicy()
      Get the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
      Returns:
      the useRollingUpgradePolicy value.
    • setUseRollingUpgradePolicy

      public AutomaticOsUpgradePolicy setUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy)
      Set the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
      Parameters:
      useRollingUpgradePolicy - the useRollingUpgradePolicy value to set.
      Returns:
      the AutomaticOsUpgradePolicy object itself.
    • isOsRollingUpgradeDeferral

      public Boolean isOsRollingUpgradeDeferral()
      Get the osRollingUpgradeDeferral property: Defer OS upgrades on the TVMs if they are running tasks.
      Returns:
      the osRollingUpgradeDeferral value.
    • setOsRollingUpgradeDeferral

      public AutomaticOsUpgradePolicy setOsRollingUpgradeDeferral(Boolean osRollingUpgradeDeferral)
      Set the osRollingUpgradeDeferral property: Defer OS upgrades on the TVMs if they are running tasks.
      Parameters:
      osRollingUpgradeDeferral - the osRollingUpgradeDeferral value to set.
      Returns:
      the AutomaticOsUpgradePolicy object itself.
    • toJson

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

      public static AutomaticOsUpgradePolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AutomaticOsUpgradePolicy from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AutomaticOsUpgradePolicy 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 AutomaticOsUpgradePolicy.