ReservationAffinity

Specifies the reservations that this instance can consume from.

JSON representation
{
  "consumeReservationType": enum (Type),
  "key": string,
  "values": [
    string
  ]
}
Fields
consumeReservationType

enum (Type)

Specifies the type of reservation from which this instance can consume resources:

ANY_RESERVATION

(default),

SPECIFIC_RESERVATION

, or

NO_RESERVATION

. See Consuming reserved instances for examples.

key

string

Corresponds to the label key of a reservation resource. To target a

SPECIFIC_RESERVATION

by name, specify

googleapis.com/reservation-name

as the key and specify the name of your reservation as its value.

values[]

string

Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.

Type

Indicates whether to consume from a reservation or not.

Enums
UNSPECIFIED
NO_RESERVATION Do not consume from any allocated capacity.
ANY_RESERVATION Consume any allocation available.
SPECIFIC_RESERVATION Must consume from a specific reservation. Must specify key value fields for specifying the reservations.
SPECIFIC_THEN_ANY_RESERVATION Prefer to consume from a specific reservation, but still consume any reservation available if the specified reservation is not available or exhausted. Must specify key value fields for specifying the reservations.
SPECIFIC_THEN_NO_RESERVATION Prefer to consume from a specific reservation, but still consume from the on-demand pool if the specified reservation is exhausted. Must specify key value fields for specifying the reservations.