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
    Constructor
    Description
    Creates an instance of PriorityMixPolicy class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the baseRegularPriorityCount property: The base number of regular priority VMs that will be created in this scale set as it scales out.
    fromJson(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.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    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, wait

    Methods 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

      public Integer 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

      public PriorityMixPolicy 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.
      Parameters:
      baseRegularPriorityCount - the baseRegularPriorityCount value to set.
      Returns:
      the PriorityMixPolicy object itself.
    • regularPriorityPercentageAboveBase

      public Integer 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<PriorityMixPolicy>
      Throws:
      IOException
    • fromJson

      public static PriorityMixPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.