Class BillingProfile
java.lang.Object
com.azure.resourcemanager.compute.models.BillingProfile
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BillingProfile>
public final class BillingProfile
extends Object
implements com.azure.json.JsonSerializable<BillingProfile>
Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BillingProfilefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of BillingProfile from the JsonReader.maxPrice()Get the maxPrice property: Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withMaxPrice(Double maxPrice) Set the maxPrice property: Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS.Methods inherited from class java.lang.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
-
BillingProfile
public BillingProfile()Creates an instance of BillingProfile class.
-
-
Method Details
-
maxPrice
Get the maxPrice property: Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01.- Returns:
- the maxPrice value.
-
withMaxPrice
Set the maxPrice property: Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01.- Parameters:
maxPrice- the maxPrice value to set.- Returns:
- the BillingProfile 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<BillingProfile>- Throws:
IOException
-
fromJson
Reads an instance of BillingProfile from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of BillingProfile 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 BillingProfile.
-