Class: Google::Apis::ComputeBeta::ReservationAffinity

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

Overview

Specifies the reservations that this instance can consume from.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ReservationAffinity

Returns a new instance of ReservationAffinity.



23925
23926
23927
# File 'generated/google/apis/compute_beta/classes.rb', line 23925

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)


23911
23912
23913
# File 'generated/google/apis/compute_beta/classes.rb', line 23911

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)


23918
23919
23920
# File 'generated/google/apis/compute_beta/classes.rb', line 23918

def key
  @key
end

#valuesArray<String>

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

Returns:

  • (Array<String>)


23923
23924
23925
# File 'generated/google/apis/compute_beta/classes.rb', line 23923

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



23930
23931
23932
23933
23934
# File 'generated/google/apis/compute_beta/classes.rb', line 23930

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