ReservationType Class

public final class ReservationType
extends ExpandableStringEnum<ReservationType>

Indicates the type of capacity reservation. Allowed values are 'Block' for block capacity reservations that enable a VM to consume capacity only from this capacity block when it is associated using a capacity reservation group, 'Targeted' for reservations that enable a VM to consume capacity from an explicitly associated capacity reservation group and fall back to the publicly available capacity if the reservation is full, and 'Open' for reservations that a VM consumes when it is eligible from an implicitly associated capacity reservation group with the matching VM size and zone without associating that capacity reservation group and fall back to the publicly available capacity if the reservation is full. Future capacity reservations can be created in 'Targeted' or 'Open' capacity reservation groups. The reservation type is immutable and cannot be changed after the capacity reservation group is created.

Field Summary

Modifier and Type Field and Description
static final ReservationType BLOCK

Block capacity reservations that enable a VM to consume capacity only from this capacity block when it is associated using a capacity reservation group.

static final ReservationType OPEN

Reservations that a VM consumes when it is eligible from an implicitly associated capacity reservation group with the matching VM size and zone without associating that capacity reservation group, and fall back to the publicly available capacity if the reservation is full.

static final ReservationType TARGETED

Reservations that enable a VM to consume capacity from an explicitly associated capacity reservation group and fall back to the publicly available capacity if the reservation is full.

Constructor Summary

Constructor Description
ReservationType()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of ReservationType value.

Method Summary

Modifier and Type Method and Description
static ReservationType fromString(String name)

Creates or finds a ReservationType from its string representation.

static Collection<ReservationType> values()

Gets known ReservationType values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

BLOCK

public static final ReservationType BLOCK

Block capacity reservations that enable a VM to consume capacity only from this capacity block when it is associated using a capacity reservation group.

OPEN

public static final ReservationType OPEN

Reservations that a VM consumes when it is eligible from an implicitly associated capacity reservation group with the matching VM size and zone without associating that capacity reservation group, and fall back to the publicly available capacity if the reservation is full. Minimum api-version: 2026-04-01.

TARGETED

public static final ReservationType TARGETED

Reservations that enable a VM to consume capacity from an explicitly associated capacity reservation group and fall back to the publicly available capacity if the reservation is full.

Constructor Details

ReservationType

@Deprecated
public ReservationType()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of ReservationType value.

Method Details

fromString

public static ReservationType fromString(String name)

Creates or finds a ReservationType from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding ReservationType.

values

public static Collection<ReservationType> values()

Gets known ReservationType values.

Returns:

known ReservationType values.

Applies to