AutomaticOSUpgradePolicy Class

  • java.lang.Object
    • com.microsoft.azure.batch.protocol.models.AutomaticOSUpgradePolicy

public class AutomaticOSUpgradePolicy

The configuration parameters used for performing automatic OS upgrade.

Constructor Summary

Constructor Description
AutomaticOSUpgradePolicy()

Method Summary

Modifier and Type Method and Description
Boolean disableAutomaticRollback()

Get whether OS image rollback feature should be disabled.

Boolean enableAutomaticOSUpgrade()

Get 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.

Boolean osRollingUpgradeDeferral()

Get defer OS upgrades on the TVMs if they are running tasks.

Boolean useRollingUpgradePolicy()

Get indicates whether rolling upgrade policy should be used during Auto OS Upgrade.

AutomaticOSUpgradePolicy withDisableAutomaticRollback(Boolean disableAutomaticRollback)

Set whether OS image rollback feature should be disabled.

AutomaticOSUpgradePolicy withEnableAutomaticOSUpgrade(Boolean enableAutomaticOSUpgrade)

Set 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.

AutomaticOSUpgradePolicy withOsRollingUpgradeDeferral(Boolean osRollingUpgradeDeferral)

Set defer OS upgrades on the TVMs if they are running tasks.

AutomaticOSUpgradePolicy withUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy)

Set indicates whether rolling upgrade policy should be used during Auto OS Upgrade.

Methods inherited from java.lang.Object

Constructor Details

AutomaticOSUpgradePolicy

public AutomaticOSUpgradePolicy()

Method Details

disableAutomaticRollback

public Boolean disableAutomaticRollback()

Get whether OS image rollback feature should be disabled.

Returns:

the disableAutomaticRollback value

enableAutomaticOSUpgrade

public Boolean enableAutomaticOSUpgrade()

Get 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.

If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchservice/pool/add?tabs=HTTP\#windowsconfiguration) cannot be set to true.

Returns:

the enableAutomaticOSUpgrade value

osRollingUpgradeDeferral

public Boolean osRollingUpgradeDeferral()

Get defer OS upgrades on the TVMs if they are running tasks.

Returns:

the osRollingUpgradeDeferral value

useRollingUpgradePolicy

public Boolean useRollingUpgradePolicy()

Get indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.

Returns:

the useRollingUpgradePolicy value

withDisableAutomaticRollback

public AutomaticOSUpgradePolicy withDisableAutomaticRollback(Boolean disableAutomaticRollback)

Set whether OS image rollback feature should be disabled.

Parameters:

disableAutomaticRollback - the disableAutomaticRollback value to set

Returns:

the AutomaticOSUpgradePolicy object itself.

withEnableAutomaticOSUpgrade

public AutomaticOSUpgradePolicy withEnableAutomaticOSUpgrade(Boolean enableAutomaticOSUpgrade)

Set 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.

If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchservice/pool/add?tabs=HTTP\#windowsconfiguration) cannot be set to true.

Parameters:

enableAutomaticOSUpgrade - the enableAutomaticOSUpgrade value to set

Returns:

the AutomaticOSUpgradePolicy object itself.

withOsRollingUpgradeDeferral

public AutomaticOSUpgradePolicy withOsRollingUpgradeDeferral(Boolean osRollingUpgradeDeferral)

Set defer OS upgrades on the TVMs if they are running tasks.

Parameters:

osRollingUpgradeDeferral - the osRollingUpgradeDeferral value to set

Returns:

the AutomaticOSUpgradePolicy object itself.

withUseRollingUpgradePolicy

public AutomaticOSUpgradePolicy withUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy)

Set indicates whether rolling upgrade policy should be used during Auto OS Upgrade. 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.

Applies to