Class RollingUpgradePolicy
- java.lang.Object
-
- com.azure.resourcemanager.compute.models.RollingUpgradePolicy
-
public final class RollingUpgradePolicy extends Object
The configuration parameters used while performing a rolling upgrade.
-
-
Constructor Summary
Constructors Constructor Description RollingUpgradePolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanenableCrossZoneUpgrade()Get the enableCrossZoneUpgrade property: Allow VMSS to ignore AZ boundaries when constructing upgrade batches.IntegermaxBatchInstancePercent()Get the maxBatchInstancePercent property: The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch.IntegermaxUnhealthyInstancePercent()Get the maxUnhealthyInstancePercent property: 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.IntegermaxUnhealthyUpgradedInstancePercent()Get the maxUnhealthyUpgradedInstancePercent property: The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state.StringpauseTimeBetweenBatches()Get the pauseTimeBetweenBatches property: The wait time between completing the update for all virtual machines in one batch and starting the next batch.BooleanprioritizeUnhealthyInstances()Get the prioritizeUnhealthyInstances property: Upgrade all unhealthy instances in a scale set before any healthy instances.voidvalidate()Validates the instance.RollingUpgradePolicywithEnableCrossZoneUpgrade(Boolean enableCrossZoneUpgrade)Set the enableCrossZoneUpgrade property: Allow VMSS to ignore AZ boundaries when constructing upgrade batches.RollingUpgradePolicywithMaxBatchInstancePercent(Integer maxBatchInstancePercent)Set the maxBatchInstancePercent property: The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch.RollingUpgradePolicywithMaxUnhealthyInstancePercent(Integer maxUnhealthyInstancePercent)Set the maxUnhealthyInstancePercent property: 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.RollingUpgradePolicywithMaxUnhealthyUpgradedInstancePercent(Integer maxUnhealthyUpgradedInstancePercent)Set the maxUnhealthyUpgradedInstancePercent property: The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state.RollingUpgradePolicywithPauseTimeBetweenBatches(String pauseTimeBetweenBatches)Set the pauseTimeBetweenBatches property: The wait time between completing the update for all virtual machines in one batch and starting the next batch.RollingUpgradePolicywithPrioritizeUnhealthyInstances(Boolean prioritizeUnhealthyInstances)Set the prioritizeUnhealthyInstances property: Upgrade all unhealthy instances in a scale set before any healthy instances.
-
-
-
Method Detail
-
maxBatchInstancePercent
public Integer maxBatchInstancePercent()
Get the maxBatchInstancePercent property: 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 maxBatchInstancePercent property: 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 maxUnhealthyInstancePercent property: 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 maxUnhealthyInstancePercent property: 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 maxUnhealthyUpgradedInstancePercent property: 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 maxUnhealthyUpgradedInstancePercent property: 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 pauseTimeBetweenBatches property: 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 pauseTimeBetweenBatches property: 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 the enableCrossZoneUpgrade property: 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 the enableCrossZoneUpgrade property: 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 the prioritizeUnhealthyInstances property: Upgrade all unhealthy instances in a scale set before any healthy instances.- Returns:
- the prioritizeUnhealthyInstances value.
-
withPrioritizeUnhealthyInstances
public RollingUpgradePolicy withPrioritizeUnhealthyInstances(Boolean prioritizeUnhealthyInstances)
Set the prioritizeUnhealthyInstances property: Upgrade all unhealthy instances in a scale set before any healthy instances.- Parameters:
prioritizeUnhealthyInstances- the prioritizeUnhealthyInstances value to set.- Returns:
- the RollingUpgradePolicy object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-