AutomaticOSUpgradePolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.AutomaticOSUpgradePolicy

public final class AutomaticOSUpgradePolicy

The configuration parameters used for performing automatic OS upgrade.

Constructor Summary

Constructor Description
AutomaticOSUpgradePolicy()

Creates an instance of AutomaticOSUpgradePolicy class.

Method Summary

Modifier and Type Method and Description
Boolean disableAutomaticRollback()

Get the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.

Boolean enableAutomaticOSUpgrade()

Get the enableAutomaticOSUpgrade property: 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 the osRollingUpgradeDeferral property: Indicates whether Auto OS Upgrade should undergo deferral.

Boolean useRollingUpgradePolicy()

Get the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS Upgrade.

void validate()

Validates the instance.

AutomaticOSUpgradePolicy withDisableAutomaticRollback(Boolean disableAutomaticRollback)

Set the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.

AutomaticOSUpgradePolicy withEnableAutomaticOSUpgrade(Boolean enableAutomaticOSUpgrade)

Set the enableAutomaticOSUpgrade property: 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 the osRollingUpgradeDeferral property: Indicates whether Auto OS Upgrade should undergo deferral.

AutomaticOSUpgradePolicy withUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy)

Set the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS Upgrade.

Methods inherited from java.lang.Object

Constructor Details

AutomaticOSUpgradePolicy

public AutomaticOSUpgradePolicy()

Creates an instance of AutomaticOSUpgradePolicy class.

Method Details

disableAutomaticRollback

public Boolean disableAutomaticRollback()

Get the disableAutomaticRollback property: Whether OS image rollback feature should be disabled. Default value is false.

Returns:

the disableAutomaticRollback value.

enableAutomaticOSUpgrade

public Boolean enableAutomaticOSUpgrade()

Get the enableAutomaticOSUpgrade property: 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. Default value is false. If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.

Returns:

the enableAutomaticOSUpgrade value.

osRollingUpgradeDeferral

public Boolean osRollingUpgradeDeferral()

Get the osRollingUpgradeDeferral property: Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.

Returns:

the osRollingUpgradeDeferral value.

useRollingUpgradePolicy

public Boolean useRollingUpgradePolicy()

Get the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.

Returns:

the useRollingUpgradePolicy value.

validate

public void validate()

Validates the instance.

withDisableAutomaticRollback

public AutomaticOSUpgradePolicy withDisableAutomaticRollback(Boolean disableAutomaticRollback)

Set the disableAutomaticRollback property: Whether OS image rollback feature should be disabled. Default value is false.

Parameters:

disableAutomaticRollback - the disableAutomaticRollback value to set.

Returns:

the AutomaticOSUpgradePolicy object itself.

withEnableAutomaticOSUpgrade

public AutomaticOSUpgradePolicy withEnableAutomaticOSUpgrade(Boolean enableAutomaticOSUpgrade)

Set the enableAutomaticOSUpgrade property: 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. Default value is false. If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.

Parameters:

enableAutomaticOSUpgrade - the enableAutomaticOSUpgrade value to set.

Returns:

the AutomaticOSUpgradePolicy object itself.

withOsRollingUpgradeDeferral

public AutomaticOSUpgradePolicy withOsRollingUpgradeDeferral(Boolean osRollingUpgradeDeferral)

Set the osRollingUpgradeDeferral property: Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM basis that an OS upgrade from rolling upgrades is incoming, via the IMDS tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.

Parameters:

osRollingUpgradeDeferral - the osRollingUpgradeDeferral value to set.

Returns:

the AutomaticOSUpgradePolicy object itself.

withUseRollingUpgradePolicy

public AutomaticOSUpgradePolicy withUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy)

Set the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. 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