UpgradePolicy Class
- java.
lang. Object - com.
azure. compute. batch. models. UpgradePolicy
- com.
Implements
public final class UpgradePolicy
implements JsonSerializable<UpgradePolicy>
Describes an upgrade policy - automatic, manual, or rolling.
Constructor Summary
| Constructor | Description |
|---|---|
| UpgradePolicy(UpgradeMode mode) |
Creates an instance of Upgrade |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Upgrade |
fromJson(JsonReader jsonReader)
Reads an instance of Upgrade |
|
Automatic |
getAutomaticOsUpgradePolicy()
Get the automatic |
|
Upgrade |
getMode()
Get the mode property: Specifies the mode of an upgrade to virtual machines in the scale set. |
|
Rolling |
getRollingUpgradePolicy()
Get the rolling |
|
Upgrade |
setAutomaticOsUpgradePolicy(AutomaticOsUpgradePolicy automaticOsUpgradePolicy)
Set the automatic |
|
Upgrade |
setRollingUpgradePolicy(RollingUpgradePolicy rollingUpgradePolicy)
Set the rolling |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
UpgradePolicy
public UpgradePolicy(UpgradeMode mode)
Creates an instance of UpgradePolicy class.
Parameters:
Method Details
fromJson
public static UpgradePolicy fromJson(JsonReader jsonReader)
Reads an instance of UpgradePolicy from the JsonReader.
Parameters:
Returns:
Throws:
getAutomaticOsUpgradePolicy
public AutomaticOsUpgradePolicy getAutomaticOsUpgradePolicy()
Get the automaticOsUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade. The configuration parameters used for performing automatic OS upgrade.
Returns:
getMode
public UpgradeMode getMode()
Get the mode property: Specifies the mode of an upgrade to virtual machines in the scale set.
Possible values are:
**Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.
**Automatic** - All virtual machines in the scale set are automatically updated at the same time.
**Rolling** - Scale set performs updates in batches with an optional pause time in between.
Returns:
getRollingUpgradePolicy
public RollingUpgradePolicy getRollingUpgradePolicy()
Get the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.
Returns:
setAutomaticOsUpgradePolicy
public UpgradePolicy setAutomaticOsUpgradePolicy(AutomaticOsUpgradePolicy automaticOsUpgradePolicy)
Set the automaticOsUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade. The configuration parameters used for performing automatic OS upgrade.
Parameters:
Returns:
setRollingUpgradePolicy
public UpgradePolicy setRollingUpgradePolicy(RollingUpgradePolicy rollingUpgradePolicy)
Set the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.
Parameters:
Returns: