Class PriorityMixPolicy
java.lang.Object
com.azure.resourcemanager.compute.models.PriorityMixPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PriorityMixPolicy>
public final class PriorityMixPolicy
extends Object
implements com.azure.json.JsonSerializable<PriorityMixPolicy>
Specifies the target splits for Spot and Regular priority VMs within a scale set with flexible orchestration mode.
With this property the customer is able to specify the base number of regular priority VMs created as the VMSS flex
instance scales out and the split between Spot and Regular priority VMs after this base target has been reached.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the baseRegularPriorityCount property: The base number of regular priority VMs that will be created in this scale set as it scales out.static PriorityMixPolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PriorityMixPolicy from the JsonReader.Get the regularPriorityPercentageAboveBase property: The percentage of VM instances, after the base regular priority count has been reached, that are expected to use regular priority.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withBaseRegularPriorityCount(Integer baseRegularPriorityCount) Set the baseRegularPriorityCount property: The base number of regular priority VMs that will be created in this scale set as it scales out.withRegularPriorityPercentageAboveBase(Integer regularPriorityPercentageAboveBase) Set the regularPriorityPercentageAboveBase property: The percentage of VM instances, after the base regular priority count has been reached, that are expected to use regular priority.Methods inherited from class 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
-
PriorityMixPolicy
public PriorityMixPolicy()Creates an instance of PriorityMixPolicy class.
-
-
Method Details
-
baseRegularPriorityCount
Get the baseRegularPriorityCount property: The base number of regular priority VMs that will be created in this scale set as it scales out.- Returns:
- the baseRegularPriorityCount value.
-
withBaseRegularPriorityCount
Set the baseRegularPriorityCount property: The base number of regular priority VMs that will be created in this scale set as it scales out.- Parameters:
baseRegularPriorityCount- the baseRegularPriorityCount value to set.- Returns:
- the PriorityMixPolicy object itself.
-
regularPriorityPercentageAboveBase
Get the regularPriorityPercentageAboveBase property: The percentage of VM instances, after the base regular priority count has been reached, that are expected to use regular priority.- Returns:
- the regularPriorityPercentageAboveBase value.
-
withRegularPriorityPercentageAboveBase
public PriorityMixPolicy withRegularPriorityPercentageAboveBase(Integer regularPriorityPercentageAboveBase) Set the regularPriorityPercentageAboveBase property: The percentage of VM instances, after the base regular priority count has been reached, that are expected to use regular priority.- Parameters:
regularPriorityPercentageAboveBase- the regularPriorityPercentageAboveBase value to set.- Returns:
- the PriorityMixPolicy object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<PriorityMixPolicy>- Throws:
IOException
-
fromJson
Reads an instance of PriorityMixPolicy from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PriorityMixPolicy 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 PriorityMixPolicy.
-