Package com.azure.compute.batch.models
Class AutomaticOsUpgradePolicy
java.lang.Object
com.azure.compute.batch.models.AutomaticOsUpgradePolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AutomaticOsUpgradePolicy>
public final class AutomaticOsUpgradePolicy
extends Object
implements com.azure.json.JsonSerializable<AutomaticOsUpgradePolicy>
The configuration parameters used for performing automatic OS upgrade.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of AutomaticOsUpgradePolicy class. -
Method Summary
Modifier and TypeMethodDescriptionstatic AutomaticOsUpgradePolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AutomaticOsUpgradePolicy from the JsonReader.Get the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.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.Get the osRollingUpgradeDeferral property: Defer OS upgrades on the TVMs if they are running tasks.Get the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS Upgrade.setDisableAutomaticRollback(Boolean disableAutomaticRollback) Set the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.setEnableAutomaticOsUpgrade(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.setOsRollingUpgradeDeferral(Boolean osRollingUpgradeDeferral) Set the osRollingUpgradeDeferral property: Defer OS upgrades on the TVMs if they are running tasks.setUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy) Set the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS Upgrade.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
AutomaticOsUpgradePolicy
public AutomaticOsUpgradePolicy()Creates an instance of AutomaticOsUpgradePolicy class.
-
-
Method Details
-
isDisableAutomaticRollback
Get the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.- Returns:
- the disableAutomaticRollback value.
-
setDisableAutomaticRollback
Set the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.- Parameters:
disableAutomaticRollback- the disableAutomaticRollback value to set.- Returns:
- the AutomaticOsUpgradePolicy object itself.
-
isEnableAutomaticOsUpgrade
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. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true.- Returns:
- the enableAutomaticOsUpgrade value.
-
setEnableAutomaticOsUpgrade
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. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/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.
-
isUseRollingUpgradePolicy
Get the useRollingUpgradePolicy property: 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.
-
setUseRollingUpgradePolicy
Set the useRollingUpgradePolicy property: 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.
-
isOsRollingUpgradeDeferral
Get the osRollingUpgradeDeferral property: Defer OS upgrades on the TVMs if they are running tasks.- Returns:
- the osRollingUpgradeDeferral value.
-
setOsRollingUpgradeDeferral
Set the osRollingUpgradeDeferral property: Defer OS upgrades on the TVMs if they are running tasks.- Parameters:
osRollingUpgradeDeferral- the osRollingUpgradeDeferral value to set.- Returns:
- the AutomaticOsUpgradePolicy object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<AutomaticOsUpgradePolicy>- Throws:
IOException
-
fromJson
public static AutomaticOsUpgradePolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AutomaticOsUpgradePolicy from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of AutomaticOsUpgradePolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the AutomaticOsUpgradePolicy.
-