Class: Google::Apis::ComputeBeta::ReservationAffinity
- Inherits:
-
Object
- Object
- Google::Apis::ComputeBeta::ReservationAffinity
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_beta/classes.rb,
lib/google/apis/compute_beta/representations.rb,
lib/google/apis/compute_beta/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.
Constructor Details
#initialize(**args) ⇒ ReservationAffinity
Returns a new instance of ReservationAffinity.
35011 35012 35013 |
# File 'lib/google/apis/compute_beta/classes.rb', line 35011 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
34994 34995 34996 |
# File 'lib/google/apis/compute_beta/classes.rb', line 34994 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
35001 35002 35003 |
# File 'lib/google/apis/compute_beta/classes.rb', line 35001 def key @key end |
#values ⇒ Array<String>
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
35009 35010 35011 |
# File 'lib/google/apis/compute_beta/classes.rb', line 35009 def values @values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
35016 35017 35018 35019 35020 |
# File 'lib/google/apis/compute_beta/classes.rb', line 35016 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 |