Class: Google::Apis::ComputeV1::ReservationAffinity

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_v1/classes.rb,
lib/google/apis/compute_v1/representations.rb,
lib/google/apis/compute_v1/representations.rb

Overview

Specifies the reservations that this instance can consume from.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReservationAffinity

Returns a new instance of ReservationAffinity.



25035
25036
25037
# File 'lib/google/apis/compute_v1/classes.rb', line 25035

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#consume_reservation_typeString

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

Returns:

  • (String)


25021
25022
25023
# File 'lib/google/apis/compute_v1/classes.rb', line 25021

def consume_reservation_type
  @consume_reservation_type
end

#keyString

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

Returns:

  • (String)


25028
25029
25030
# File 'lib/google/apis/compute_v1/classes.rb', line 25028

def key
  @key
end

#valuesArray<String>

Corresponds to the label values of a reservation resource. Corresponds to the JSON property values

Returns:

  • (Array<String>)


25033
25034
25035
# File 'lib/google/apis/compute_v1/classes.rb', line 25033

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



25040
25041
25042
25043
25044
# File 'lib/google/apis/compute_v1/classes.rb', line 25040

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