Class: Google::Apis::ComputeV1::ReservationAffinity
- Inherits:
-
Object
- Object
- Google::Apis::ComputeV1::ReservationAffinity
- Defined in:
- generated/google/apis/compute_v1/classes.rb,
generated/google/apis/compute_v1/representations.rb,
generated/google/apis/compute_v1/representations.rb
Overview
ReservationAffinity is the configuration of desired reservation which this instance could take capacity 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 reservation resource.
-
#values ⇒ Array<String>
Corresponds to the label values of 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
18150 18151 18152 |
# File 'generated/google/apis/compute_v1/classes.rb', line 18150 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
18138 18139 18140 |
# File 'generated/google/apis/compute_v1/classes.rb', line 18138 def consume_reservation_type @consume_reservation_type end |
#key ⇒ String
Corresponds to the label key of reservation resource.
Corresponds to the JSON property key
18143 18144 18145 |
# File 'generated/google/apis/compute_v1/classes.rb', line 18143 def key @key end |
#values ⇒ Array<String>
Corresponds to the label values of reservation resource.
Corresponds to the JSON property values
18148 18149 18150 |
# File 'generated/google/apis/compute_v1/classes.rb', line 18148 def values @values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
18155 18156 18157 18158 18159 |
# File 'generated/google/apis/compute_v1/classes.rb', line 18155 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 |