CapacityReservationType Class
- java.
lang. Object - com.
azure. core. util. ExpandableStringEnum<T> - com.
azure. resourcemanager. compute. models. CapacityReservationType
- com.
- com.
public final class CapacityReservationType
extends ExpandableStringEnum<CapacityReservationType>
Specifies which type of capacity reservation the virtual machine will consume capacity from if eligible or whether it is explicitly opted out from being associated and consuming capacity from any reserved capacity available in the subscription. Minimum api-version: 2026-04-01.
Field Summary
| Modifier and Type | Field and Description |
|---|---|
|
static final
Capacity |
BLOCK
The virtual machine consumes capacity from a specific matching capacity reservation when associated with a capacity reservation group resource of type block, and will hit capacity failures if there is no available capacity in the block reservation. |
|
static final
Capacity |
DISABLED
The virtual machine has capacity reservation assignment disabled and will not be allowed to implicitly or explicitly associate with any type of capacity reservation. |
|
static final
Capacity |
NOT_ELIGIBLE
The virtual machine is not eligible to be implicitly associated with an open capacity reservation and is not explicitly associated with any capacity reservation group, so it will consume capacity from the publicly available capacity. |
|
static final
Capacity |
OPEN
The virtual machine if eligible will implicitly associate and consume any available capacity from a matching open capacity reservation created or shared in the subscription. |
|
static final
Capacity |
TARGETED
The virtual machine will consume capacity from a specific matching capacity reservation when associated with a capacity reservation group resource of type targeted, but can fall back to consume capacity from the publicly available capacity if there is no capacity available in the targeted reservation. |
Constructor Summary
| Constructor | Description |
|---|---|
| CapacityReservationType() |
Deprecated
Use the fromString(String name) factory method.
Creates a new instance of Capacity |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Capacity |
fromString(String name)
Creates or finds a Capacity |
|
static
Collection<Capacity |
values()
Gets known Capacity |
Methods inherited from ExpandableStringEnum
Methods inherited from java.lang.Object
Field Details
BLOCK
public static final CapacityReservationType BLOCK
The virtual machine consumes capacity from a specific matching capacity reservation when associated with a capacity reservation group resource of type block, and will hit capacity failures if there is no available capacity in the block reservation.
DISABLED
public static final CapacityReservationType DISABLED
The virtual machine has capacity reservation assignment disabled and will not be allowed to implicitly or explicitly associate with any type of capacity reservation.
NOT_ELIGIBLE
public static final CapacityReservationType NOT_ELIGIBLE
The virtual machine is not eligible to be implicitly associated with an open capacity reservation and is not explicitly associated with any capacity reservation group, so it will consume capacity from the publicly available capacity.
OPEN
public static final CapacityReservationType OPEN
The virtual machine if eligible will implicitly associate and consume any available capacity from a matching open capacity reservation created or shared in the subscription. **Note:** The VM should not be explicitly associated with the open capacity reservation group resource containing the matching reservation.
TARGETED
public static final CapacityReservationType TARGETED
The virtual machine will consume capacity from a specific matching capacity reservation when associated with a capacity reservation group resource of type targeted, but can fall back to consume capacity from the publicly available capacity if there is no capacity available in the targeted reservation.
Constructor Details
CapacityReservationType
@Deprecated
public CapacityReservationType()
Deprecated
Creates a new instance of CapacityReservationType value.
Method Details
fromString
public static CapacityReservationType fromString(String name)
Creates or finds a CapacityReservationType from its string representation.
Parameters:
Returns:
values
public static Collection<CapacityReservationType> values()
Gets known CapacityReservationType values.
Returns: