CapacityReservationUtilization Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.CapacityReservationUtilization

Implements

public final class CapacityReservationUtilization
implements JsonSerializable<CapacityReservationUtilization>

Represents the capacity reservation utilization in terms of resources allocated.

Method Summary

Modifier and Type Method and Description
Integer 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.

static CapacityReservationUtilization fromJson(JsonReader jsonReader)

Reads an instance of CapacityReservationUtilization from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
Map<String,Integer> usedReservedCountBySubscription()

Get the usedReservedCountBySubscription property: For open capacity reservations, this provides a map of the used reserved capacity count keyed by the subscription id (a GUID) that is consuming the capacity, i.e.

void validate()

Validates the instance.

List<SubResourceReadOnly> virtualMachinesAllocated()

Get the virtualMachinesAllocated property: A list of all virtual machines resource ids allocated against the capacity reservation.

Methods inherited from java.lang.Object

Method Details

currentCapacity

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

fromJson

public static CapacityReservationUtilization fromJson(JsonReader jsonReader)

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

usedReservedCountBySubscription

public Map<String,Integer> usedReservedCountBySubscription()

Get the usedReservedCountBySubscription property: For open capacity reservations, this provides a map of the used reserved capacity count keyed by the subscription id (a GUID) that is consuming the capacity, i.e. each entry maps a consuming subscription id to the count of reserved capacity it is currently using. This is populated only for open capacity reservations and is not reported for targeted and block capacity reservations, which instead report allocation through virtualMachinesAllocated. Minimum api-version: 2026-04-01.

Returns:

the usedReservedCountBySubscription value.

validate

public void validate()

Validates the instance.

virtualMachinesAllocated

public List<SubResourceReadOnly> virtualMachinesAllocated()

Get the virtualMachinesAllocated property: A list of all virtual machines resource ids allocated against the capacity reservation.

Returns:

the virtualMachinesAllocated value.

Applies to