Class UpgradePolicy
java.lang.Object
com.azure.resourcemanager.compute.models.UpgradePolicy
Describes an upgrade policy - automatic, manual, or rolling.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the automaticOSUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade.mode()Get the mode property: Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set.Get the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.voidvalidate()Validates the instance.withAutomaticOSUpgradePolicy(AutomaticOSUpgradePolicy automaticOSUpgradePolicy) Set the automaticOSUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade.withMode(UpgradeMode mode) Set the mode property: Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set.withRollingUpgradePolicy(RollingUpgradePolicy rollingUpgradePolicy) Set the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.
-
Constructor Details
-
UpgradePolicy
public UpgradePolicy()Creates an instance of UpgradePolicy class.
-
-
Method Details
-
mode
Get the mode property: Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.- Returns:
- the mode value.
-
withMode
Set the mode property: Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.- Parameters:
mode- the mode value to set.- Returns:
- the UpgradePolicy object itself.
-
rollingUpgradePolicy
Get the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.- Returns:
- the rollingUpgradePolicy value.
-
withRollingUpgradePolicy
Set the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.- Parameters:
rollingUpgradePolicy- the rollingUpgradePolicy value to set.- Returns:
- the UpgradePolicy object itself.
-
automaticOSUpgradePolicy
Get the automaticOSUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade.- Returns:
- the automaticOSUpgradePolicy value.
-
withAutomaticOSUpgradePolicy
public UpgradePolicy withAutomaticOSUpgradePolicy(AutomaticOSUpgradePolicy automaticOSUpgradePolicy) Set the automaticOSUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade.- Parameters:
automaticOSUpgradePolicy- the automaticOSUpgradePolicy value to set.- Returns:
- the UpgradePolicy object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-