CapacityReservationProfile Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. CapacityReservationProfile
- com.
Implements
public final class CapacityReservationProfile
implements JsonSerializable<CapacityReservationProfile>
The parameters of a capacity reservation Profile.
Constructor Summary
| Constructor | Description |
|---|---|
| CapacityReservationProfile() |
Creates an instance of Capacity |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Sub |
capacityReservationGroup()
Get the capacity |
| Boolean |
disableCapacityReservationAssignment()
Get the disable |
|
static
Capacity |
fromJson(JsonReader jsonReader)
Reads an instance of Capacity |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Capacity |
withCapacityReservationGroup(SubResource capacityReservationGroup)
Set the capacity |
|
Capacity |
withDisableCapacityReservationAssignment(Boolean disableCapacityReservationAssignment)
Set the disable |
Methods inherited from java.lang.Object
Constructor Details
CapacityReservationProfile
public CapacityReservationProfile()
Creates an instance of CapacityReservationProfile class.
Method Details
capacityReservationGroup
public SubResource capacityReservationGroup()
Get the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
Returns:
disableCapacityReservationAssignment
public Boolean disableCapacityReservationAssignment()
Get the disableCapacityReservationAssignment property: Specifies whether the virtual machine is explicitly opted out from being associated with any capacity reservation. When set to true, the virtual machine will not be allowed to implicitly or explicitly associate with any type of capacity reservation and will consume capacity from the publicly available capacity. Minimum api-version: 2026-04-01.
Returns:
fromJson
public static CapacityReservationProfile fromJson(JsonReader jsonReader)
Reads an instance of CapacityReservationProfile from the JsonReader.
Parameters:
Returns:
Throws:
toJson
validate
public void validate()
Validates the instance.
withCapacityReservationGroup
public CapacityReservationProfile withCapacityReservationGroup(SubResource capacityReservationGroup)
Set the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
Parameters:
Returns:
withDisableCapacityReservationAssignment
public CapacityReservationProfile withDisableCapacityReservationAssignment(Boolean disableCapacityReservationAssignment)
Set the disableCapacityReservationAssignment property: Specifies whether the virtual machine is explicitly opted out from being associated with any capacity reservation. When set to true, the virtual machine will not be allowed to implicitly or explicitly associate with any type of capacity reservation and will consume capacity from the publicly available capacity. Minimum api-version: 2026-04-01.
Parameters:
Returns: