Class UpgradePolicy

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

public final class UpgradePolicy extends Object
Describes an upgrade policy - automatic, manual, or rolling.
  • Constructor Details

    • UpgradePolicy

      public UpgradePolicy()
  • Method Details

    • mode

      public UpgradeMode mode()
      Get the mode property: Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.
      Returns:
      the mode value.
    • withMode

      public UpgradePolicy withMode(UpgradeMode mode)
      Set the mode property: Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.
      Parameters:
      mode - the mode value to set.
      Returns:
      the UpgradePolicy object itself.
    • rollingUpgradePolicy

      public RollingUpgradePolicy rollingUpgradePolicy()
      Get the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.
      Returns:
      the rollingUpgradePolicy value.
    • withRollingUpgradePolicy

      public UpgradePolicy withRollingUpgradePolicy(RollingUpgradePolicy rollingUpgradePolicy)
      Set the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.
      Parameters:
      rollingUpgradePolicy - the rollingUpgradePolicy value to set.
      Returns:
      the UpgradePolicy object itself.
    • automaticOSUpgradePolicy

      public AutomaticOSUpgradePolicy automaticOSUpgradePolicy()
      Get the automaticOSUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade.
      Returns:
      the automaticOSUpgradePolicy value.
    • withAutomaticOSUpgradePolicy

      public UpgradePolicy withAutomaticOSUpgradePolicy(AutomaticOSUpgradePolicy automaticOSUpgradePolicy)
      Set the automaticOSUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade.
      Parameters:
      automaticOSUpgradePolicy - the automaticOSUpgradePolicy value to set.
      Returns:
      the UpgradePolicy object itself.
    • validate

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