Class AutomaticOSUpgradePolicy

java.lang.Object
com.azure.resourcemanager.compute.models.AutomaticOSUpgradePolicy

public final class AutomaticOSUpgradePolicy extends Object
The configuration parameters used for performing automatic OS upgrade.
  • Constructor Details

    • AutomaticOSUpgradePolicy

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

    • enableAutomaticOSUpgrade

      public Boolean enableAutomaticOSUpgrade()
      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. Default value is false. If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.
      Returns:
      the enableAutomaticOSUpgrade value.
    • withEnableAutomaticOSUpgrade

      public AutomaticOSUpgradePolicy withEnableAutomaticOSUpgrade(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. Default value is false. If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.
      Parameters:
      enableAutomaticOSUpgrade - the enableAutomaticOSUpgrade value to set.
      Returns:
      the AutomaticOSUpgradePolicy object itself.
    • disableAutomaticRollback

      public Boolean disableAutomaticRollback()
      Get the disableAutomaticRollback property: Whether OS image rollback feature should be disabled. Default value is false.
      Returns:
      the disableAutomaticRollback value.
    • withDisableAutomaticRollback

      public AutomaticOSUpgradePolicy withDisableAutomaticRollback(Boolean disableAutomaticRollback)
      Set the disableAutomaticRollback property: Whether OS image rollback feature should be disabled. Default value is false.
      Parameters:
      disableAutomaticRollback - the disableAutomaticRollback value to set.
      Returns:
      the AutomaticOSUpgradePolicy object itself.
    • useRollingUpgradePolicy

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

      public AutomaticOSUpgradePolicy withUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy)
      Set the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. 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.
    • osRollingUpgradeDeferral

      public Boolean osRollingUpgradeDeferral()
      Get the osRollingUpgradeDeferral property: Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
      Returns:
      the osRollingUpgradeDeferral value.
    • withOsRollingUpgradeDeferral

      public AutomaticOSUpgradePolicy withOsRollingUpgradeDeferral(Boolean osRollingUpgradeDeferral)
      Set the osRollingUpgradeDeferral property: Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
      Parameters:
      osRollingUpgradeDeferral - the osRollingUpgradeDeferral value to set.
      Returns:
      the AutomaticOSUpgradePolicy object itself.
    • validate

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