Class CapacityReservationUtilization
java.lang.Object
com.azure.resourcemanager.compute.models.CapacityReservationUtilization
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CapacityReservationUtilization>
public final class CapacityReservationUtilization
extends Object
implements com.azure.json.JsonSerializable<CapacityReservationUtilization>
Represents the capacity reservation utilization in terms of resources allocated.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of CapacityReservationUtilization class. -
Method Summary
Modifier and TypeMethodDescriptionGet the currentCapacity property: The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CapacityReservationUtilization from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the virtualMachinesAllocated property: A list of all virtual machines resource ids allocated against the capacity reservation.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
-
CapacityReservationUtilization
public CapacityReservationUtilization()Creates an instance of CapacityReservationUtilization class.
-
-
Method Details
-
currentCapacity
Get the currentCapacity property: The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01.- Returns:
- the currentCapacity value.
-
virtualMachinesAllocated
Get the virtualMachinesAllocated property: A list of all virtual machines resource ids allocated against the capacity reservation.- Returns:
- the virtualMachinesAllocated value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<CapacityReservationUtilization>- Throws:
IOException
-
fromJson
public static CapacityReservationUtilization fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of CapacityReservationUtilization from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of CapacityReservationUtilization 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 CapacityReservationUtilization.
-