UpgradePolicy Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. UpgradePolicy
- com.
Implements
public final class UpgradePolicy
implements JsonSerializable<UpgradePolicy>
Describes an upgrade policy - automatic, manual, or rolling.
Constructor Summary
Constructor | Description |
---|---|
UpgradePolicy() |
Creates an instance of Upgrade |
Method Summary
Modifier and Type | Method and Description |
---|---|
Automatic |
automaticOSUpgradePolicy()
Get the automatic |
static
Upgrade |
fromJson(JsonReader jsonReader)
Reads an instance of Upgrade |
Upgrade |
mode()
Get the mode property: Specifies the mode of an upgrade to virtual machines in the scale set. |
Rolling |
rollingUpgradePolicy()
Get the rolling |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Upgrade |
withAutomaticOSUpgradePolicy(AutomaticOSUpgradePolicy automaticOSUpgradePolicy)
Set the automatic |
Upgrade |
withMode(UpgradeMode mode)
Set the mode property: Specifies the mode of an upgrade to virtual machines in the scale set. |
Upgrade |
withRollingUpgradePolicy(RollingUpgradePolicy rollingUpgradePolicy)
Set the rolling |
Methods inherited from java.lang.Object
Constructor Details
UpgradePolicy
public UpgradePolicy()
Creates an instance of UpgradePolicy class.
Method Details
automaticOSUpgradePolicy
public AutomaticOSUpgradePolicy automaticOSUpgradePolicy()
Get the automaticOSUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade.
Returns:
fromJson
public static UpgradePolicy fromJson(JsonReader jsonReader)
Reads an instance of UpgradePolicy from the JsonReader.
Parameters:
Returns:
Throws:
mode
public UpgradeMode mode()
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.
Returns:
rollingUpgradePolicy
public RollingUpgradePolicy rollingUpgradePolicy()
Get the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.
Returns:
toJson
validate
public void validate()
Validates the instance.
withAutomaticOSUpgradePolicy
public UpgradePolicy withAutomaticOSUpgradePolicy(AutomaticOSUpgradePolicy automaticOSUpgradePolicy)
Set the automaticOSUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade.
Parameters:
Returns:
withMode
public UpgradePolicy withMode(UpgradeMode mode)
Set 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.
Parameters:
Returns:
withRollingUpgradePolicy
public UpgradePolicy withRollingUpgradePolicy(RollingUpgradePolicy rollingUpgradePolicy)
Set the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.
Parameters:
Returns:
Applies to
Azure SDK for Java