RollingUpgradePolicy Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. RollingUpgradePolicy
- com.
Implements
public final class RollingUpgradePolicy
implements JsonSerializable<RollingUpgradePolicy>
The configuration parameters used while performing a rolling upgrade.
Constructor Summary
Constructor | Description |
---|---|
RollingUpgradePolicy() |
Creates an instance of Rolling |
Method Summary
Modifier and Type | Method and Description |
---|---|
Boolean |
enableCrossZoneUpgrade()
Get the enable |
static
Rolling |
fromJson(JsonReader jsonReader)
Reads an instance of Rolling |
Integer |
maxBatchInstancePercent()
Get the max |
Boolean |
maxSurge()
Get the max |
Integer |
maxUnhealthyInstancePercent()
Get the max |
Integer |
maxUnhealthyUpgradedInstancePercent()
Get the max |
String |
pauseTimeBetweenBatches()
Get the pause |
Boolean |
prioritizeUnhealthyInstances()
Get the prioritize |
Boolean |
rollbackFailedInstancesOnPolicyBreach()
Get the rollback |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Rolling |
withEnableCrossZoneUpgrade(Boolean enableCrossZoneUpgrade)
Set the enable |
Rolling |
withMaxBatchInstancePercent(Integer maxBatchInstancePercent)
Set the max |
Rolling |
withMaxSurge(Boolean maxSurge)
Set the max |
Rolling |
withMaxUnhealthyInstancePercent(Integer maxUnhealthyInstancePercent)
Set the max |
Rolling |
withMaxUnhealthyUpgradedInstancePercent(Integer maxUnhealthyUpgradedInstancePercent)
Set the max |
Rolling |
withPauseTimeBetweenBatches(String pauseTimeBetweenBatches)
Set the pause |
Rolling |
withPrioritizeUnhealthyInstances(Boolean prioritizeUnhealthyInstances)
Set the prioritize |
Rolling |
withRollbackFailedInstancesOnPolicyBreach(Boolean rollbackFailedInstancesOnPolicyBreach)
Set the rollback |
Methods inherited from java.lang.Object
Constructor Details
RollingUpgradePolicy
public RollingUpgradePolicy()
Creates an instance of RollingUpgradePolicy class.
Method Details
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:
fromJson
public static RollingUpgradePolicy fromJson(JsonReader jsonReader)
Reads an instance of RollingUpgradePolicy from the JsonReader.
Parameters:
Returns:
Throws:
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:
maxSurge
public Boolean maxSurge()
Get the maxSurge property: Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual machines will be deleted once the new virtual machines are created for each batch.
Returns:
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:
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:
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:
prioritizeUnhealthyInstances
public Boolean prioritizeUnhealthyInstances()
Get the prioritizeUnhealthyInstances property: Upgrade all unhealthy instances in a scale set before any healthy instances.
Returns:
rollbackFailedInstancesOnPolicyBreach
public Boolean rollbackFailedInstancesOnPolicyBreach()
Get the rollbackFailedInstancesOnPolicyBreach property: Rollback failed instances to previous model if the Rolling Upgrade policy is violated.
Returns:
toJson
validate
public void validate()
Validates the instance.
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:
Returns:
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:
Returns:
withMaxSurge
public RollingUpgradePolicy withMaxSurge(Boolean maxSurge)
Set the maxSurge property: Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual machines will be deleted once the new virtual machines are created for each batch.
Parameters:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
withPrioritizeUnhealthyInstances
public RollingUpgradePolicy withPrioritizeUnhealthyInstances(Boolean prioritizeUnhealthyInstances)
Set the prioritizeUnhealthyInstances property: Upgrade all unhealthy instances in a scale set before any healthy instances.
Parameters:
Returns:
withRollbackFailedInstancesOnPolicyBreach
public RollingUpgradePolicy withRollbackFailedInstancesOnPolicyBreach(Boolean rollbackFailedInstancesOnPolicyBreach)
Set the rollbackFailedInstancesOnPolicyBreach property: Rollback failed instances to previous model if the Rolling Upgrade policy is violated.
Parameters:
Returns:
Applies to
Azure SDK for Java