Class RollingUpgradePolicy

java.lang.Object
com.microsoft.azure.management.compute.RollingUpgradePolicy

public class RollingUpgradePolicy extends Object
The configuration parameters used while performing a rolling upgrade.
  • Constructor Details

    • RollingUpgradePolicy

      public RollingUpgradePolicy()
  • Method Details

    • maxBatchInstancePercent

      public Integer maxBatchInstancePercent()
      Get the maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%.
      Returns:
      the maxBatchInstancePercent value
    • withMaxBatchInstancePercent

      public RollingUpgradePolicy withMaxBatchInstancePercent(Integer maxBatchInstancePercent)
      Set the maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%.
      Parameters:
      maxBatchInstancePercent - the maxBatchInstancePercent value to set
      Returns:
      the RollingUpgradePolicy object itself.
    • maxUnhealthyInstancePercent

      public Integer maxUnhealthyInstancePercent()
      Get the maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%.
      Returns:
      the maxUnhealthyInstancePercent value
    • withMaxUnhealthyInstancePercent

      public RollingUpgradePolicy withMaxUnhealthyInstancePercent(Integer maxUnhealthyInstancePercent)
      Set the maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%.
      Parameters:
      maxUnhealthyInstancePercent - the maxUnhealthyInstancePercent value to set
      Returns:
      the RollingUpgradePolicy object itself.
    • maxUnhealthyUpgradedInstancePercent

      public Integer maxUnhealthyUpgradedInstancePercent()
      Get the maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%.
      Returns:
      the maxUnhealthyUpgradedInstancePercent value
    • withMaxUnhealthyUpgradedInstancePercent

      public RollingUpgradePolicy withMaxUnhealthyUpgradedInstancePercent(Integer maxUnhealthyUpgradedInstancePercent)
      Set the maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%.
      Parameters:
      maxUnhealthyUpgradedInstancePercent - the maxUnhealthyUpgradedInstancePercent value to set
      Returns:
      the RollingUpgradePolicy object itself.
    • pauseTimeBetweenBatches

      public String pauseTimeBetweenBatches()
      Get the wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S).
      Returns:
      the pauseTimeBetweenBatches value
    • withPauseTimeBetweenBatches

      public RollingUpgradePolicy withPauseTimeBetweenBatches(String pauseTimeBetweenBatches)
      Set the wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S).
      Parameters:
      pauseTimeBetweenBatches - the pauseTimeBetweenBatches value to set
      Returns:
      the RollingUpgradePolicy object itself.
    • enableCrossZoneUpgrade

      public Boolean enableCrossZoneUpgrade()
      Get allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size.
      Returns:
      the enableCrossZoneUpgrade value
    • withEnableCrossZoneUpgrade

      public RollingUpgradePolicy withEnableCrossZoneUpgrade(Boolean enableCrossZoneUpgrade)
      Set allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size.
      Parameters:
      enableCrossZoneUpgrade - the enableCrossZoneUpgrade value to set
      Returns:
      the RollingUpgradePolicy object itself.
    • prioritizeUnhealthyInstances

      public Boolean prioritizeUnhealthyInstances()
      Get upgrade all unhealthy instances in a scale set before any healthy instances.
      Returns:
      the prioritizeUnhealthyInstances value
    • withPrioritizeUnhealthyInstances

      public RollingUpgradePolicy withPrioritizeUnhealthyInstances(Boolean prioritizeUnhealthyInstances)
      Set upgrade all unhealthy instances in a scale set before any healthy instances.
      Parameters:
      prioritizeUnhealthyInstances - the prioritizeUnhealthyInstances value to set
      Returns:
      the RollingUpgradePolicy object itself.