AutomaticOsUpgradePolicy Class
- java.
lang. Object - com.
azure. compute. batch. 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 |
|---|---|
|
static
Automatic |
fromJson(JsonReader jsonReader)
Reads an instance of Automatic |
| Boolean |
isDisableAutomaticRollback()
Get the disable |
| Boolean |
isEnableAutomaticOsUpgrade()
Get the enable |
| Boolean |
isOsRollingUpgradeDeferral()
Get the os |
| Boolean |
isUseRollingUpgradePolicy()
Get the use |
|
Automatic |
setDisableAutomaticRollback(Boolean disableAutomaticRollback)
Set the disable |
|
Automatic |
setEnableAutomaticOsUpgrade(Boolean enableAutomaticOsUpgrade)
Set the enable |
|
Automatic |
setOsRollingUpgradeDeferral(Boolean osRollingUpgradeDeferral)
Set the os |
|
Automatic |
setUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy)
Set the use |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
AutomaticOsUpgradePolicy
public AutomaticOsUpgradePolicy()
Creates an instance of AutomaticOsUpgradePolicy class.
Method Details
fromJson
public static AutomaticOsUpgradePolicy fromJson(JsonReader jsonReader)
Reads an instance of AutomaticOsUpgradePolicy from the JsonReader.
Parameters:
Returns:
Throws:
isDisableAutomaticRollback
public Boolean isDisableAutomaticRollback()
Get the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.
Returns:
isEnableAutomaticOsUpgrade
public Boolean 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.
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:
isOsRollingUpgradeDeferral
public Boolean isOsRollingUpgradeDeferral()
Get the osRollingUpgradeDeferral property: Defer OS upgrades on the TVMs if they are running tasks.
Returns:
isUseRollingUpgradePolicy
public Boolean 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:
setDisableAutomaticRollback
public AutomaticOsUpgradePolicy setDisableAutomaticRollback(Boolean disableAutomaticRollback)
Set the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.
Parameters:
Returns:
setEnableAutomaticOsUpgrade
public AutomaticOsUpgradePolicy 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.
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:
Returns:
setOsRollingUpgradeDeferral
public AutomaticOsUpgradePolicy setOsRollingUpgradeDeferral(Boolean osRollingUpgradeDeferral)
Set the osRollingUpgradeDeferral property: Defer OS upgrades on the TVMs if they are running tasks.
Parameters:
Returns:
setUseRollingUpgradePolicy
public AutomaticOsUpgradePolicy setUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy)
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:
Returns: