BillingProfile Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. BillingProfile
- com.
Implements
public final class BillingProfile
implements JsonSerializable<BillingProfile>
Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.
Constructor Summary
Constructor | Description |
---|---|
BillingProfile() |
Creates an instance of Billing |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Billing |
fromJson(JsonReader jsonReader)
Reads an instance of Billing |
Double |
maxPrice()
Get the max |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Billing |
withMaxPrice(Double maxPrice)
Set the max |
Methods inherited from java.lang.Object
Constructor Details
BillingProfile
public BillingProfile()
Creates an instance of BillingProfile class.
Method Details
fromJson
public static BillingProfile fromJson(JsonReader jsonReader)
Reads an instance of BillingProfile from the JsonReader.
Parameters:
Returns:
Throws:
maxPrice
public Double 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.
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.
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.
Possible values are:
- Any decimal value greater than zero. Example: 0.01538
-1 \u2013 indicates default price to be up-to on-demand.
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.
Minimum api-version: 2019-03-01.
Returns:
toJson
validate
public void validate()
Validates the instance.
withMaxPrice
public BillingProfile withMaxPrice(Double maxPrice)
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.
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.
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.
Possible values are:
- Any decimal value greater than zero. Example: 0.01538
-1 \u2013 indicates default price to be up-to on-demand.
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.
Minimum api-version: 2019-03-01.
Parameters:
Returns:
Applies to
Azure SDK for Java