Class: Google::Apis::ComputeAlpha::ReservationAffinity
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::ReservationAffinity
- Defined in:
- generated/google/apis/compute_alpha/classes.rb,
generated/google/apis/compute_alpha/representations.rb,
generated/google/apis/compute_alpha/representations.rb
Overview
Specifies the reservations that this instance can consume from.
Instance Attribute Summary collapse
-
#consume_reservation_type ⇒ String
Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION.
-
#key ⇒ String
Corresponds to the label key of a reservation resource.
-
#values ⇒ Array<String>
Corresponds to the label values of a reservation resource.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ReservationAffinity
constructor
A new instance of ReservationAffinity.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ ReservationAffinity
Returns a new instance of ReservationAffinity
25465 25466 25467 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 25465 def initialize(**args) update!(**args) end |
Instance Attribute Details
#consume_reservation_type ⇒ String
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
25451 25452 25453 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 25451 def consume_reservation_type @consume_reservation_type end |
#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.
Corresponds to the JSON property key
25458 25459 25460 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 25458 def key @key end |
#values ⇒ Array<String>
Corresponds to the label values of a reservation resource.
Corresponds to the JSON property values
25463 25464 25465 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 25463 def values @values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
25470 25471 25472 25473 25474 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 25470 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 |