class Google::Apis::ComputeV1::ReservationAffinity

Specifies the reservations that this instance can consume from.

Attributes

consume_reservation_type[RW]

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. Corresponds to the JSON property `consumeReservationType` @return [String]

key[RW]

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. Corresponds to the JSON property `key` @return [String]

values[RW]

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. Corresponds to the JSON property `values` @return [Array<String>]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/compute_v1/classes.rb, line 27883
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/compute_v1/classes.rb, line 27888
def update!(**args)
  @consume_reservation_type = args[:consume_reservation_type] if args.key?(:consume_reservation_type)
  @key = args[:key] if args.key?(:key)
  @values = args[:values] if args.key?(:values)
end