AutomaticOSUpgradePolicy Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. AutomaticOSUpgradePolicy
- com.
Implements
public final class AutomaticOSUpgradePolicy
implements JsonSerializable<AutomaticOSUpgradePolicy>
The configuration parameters used for performing automatic OS upgrade.
Constructor Summary
Constructor | Description |
---|---|
AutomaticOSUpgradePolicy() |
Creates an instance of Automatic |
Method Summary
Modifier and Type | Method and Description |
---|---|
Boolean |
disableAutomaticRollback()
Get the disable |
Boolean |
enableAutomaticOSUpgrade()
Get the enable |
static
Automatic |
fromJson(JsonReader jsonReader)
Reads an instance of Automatic |
Boolean |
osRollingUpgradeDeferral()
Get the os |
Json |
toJson(JsonWriter jsonWriter) |
Boolean |
useRollingUpgradePolicy()
Get the use |
void |
validate()
Validates the instance. |
Automatic |
withDisableAutomaticRollback(Boolean disableAutomaticRollback)
Set the disable |
Automatic |
withEnableAutomaticOSUpgrade(Boolean enableAutomaticOSUpgrade)
Set the enable |
Automatic |
withOsRollingUpgradeDeferral(Boolean osRollingUpgradeDeferral)
Set the os |
Automatic |
withUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy)
Set the use |
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:
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:
fromJson
public static AutomaticOSUpgradePolicy fromJson(JsonReader jsonReader)
Reads an instance of AutomaticOSUpgradePolicy from the JsonReader.
Parameters:
Returns:
Throws:
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:
toJson
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:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
Applies to
Azure SDK for Java