Class SkuProfile

java.lang.Object
com.azure.resourcemanager.compute.models.SkuProfile
All Implemented Interfaces:
com.azure.json.JsonSerializable<SkuProfile>

public final class SkuProfile extends Object implements com.azure.json.JsonSerializable<SkuProfile>
Specifies the sku profile for the virtual machine scale set. With this property the customer is able to specify a list of VM sizes and an allocation strategy.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of SkuProfile class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the allocationStrategy property: Specifies the allocation strategy for the virtual machine scale set based on which the VMs will be allocated.
    static SkuProfile
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of SkuProfile from the JsonReader.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Get the vmSizes property: Specifies the VM sizes for the virtual machine scale set.
    Set the allocationStrategy property: Specifies the allocation strategy for the virtual machine scale set based on which the VMs will be allocated.
    Set the vmSizes property: Specifies the VM sizes for the virtual machine scale set.

    Methods inherited from class java.lang.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

    • SkuProfile

      public SkuProfile()
      Creates an instance of SkuProfile class.
  • Method Details

    • vmSizes

      public List<SkuProfileVMSize> vmSizes()
      Get the vmSizes property: Specifies the VM sizes for the virtual machine scale set.
      Returns:
      the vmSizes value.
    • withVmSizes

      public SkuProfile withVmSizes(List<SkuProfileVMSize> vmSizes)
      Set the vmSizes property: Specifies the VM sizes for the virtual machine scale set.
      Parameters:
      vmSizes - the vmSizes value to set.
      Returns:
      the SkuProfile object itself.
    • allocationStrategy

      public AllocationStrategy allocationStrategy()
      Get the allocationStrategy property: Specifies the allocation strategy for the virtual machine scale set based on which the VMs will be allocated.
      Returns:
      the allocationStrategy value.
    • withAllocationStrategy

      public SkuProfile withAllocationStrategy(AllocationStrategy allocationStrategy)
      Set the allocationStrategy property: Specifies the allocation strategy for the virtual machine scale set based on which the VMs will be allocated.
      Parameters:
      allocationStrategy - the allocationStrategy value to set.
      Returns:
      the SkuProfile 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<SkuProfile>
      Throws:
      IOException
    • fromJson

      public static SkuProfile fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SkuProfile from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SkuProfile 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 SkuProfile.