Class: Google::Apis::NotebooksV2::ReservationAffinity
- Inherits:
-
Object
- Object
- Google::Apis::NotebooksV2::ReservationAffinity
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/notebooks_v2/classes.rb,
lib/google/apis/notebooks_v2/representations.rb,
lib/google/apis/notebooks_v2/representations.rb
Overview
A reservation that an instance can consume from.
Instance Attribute Summary collapse
-
#consume_reservation_type ⇒ String
Required.
-
#key ⇒ String
Optional.
-
#values ⇒ Array<String>
Optional.
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.
1519 1520 1521 |
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1519 def initialize(**args) update!(**args) end |
Instance Attribute Details
#consume_reservation_type ⇒ String
Required. Specifies the type of reservation from which this instance can
consume resources: RESERVATION_ANY (default), RESERVATION_SPECIFIC, or
RESERVATION_NONE. See Consuming reserved instances for examples.
Corresponds to the JSON property consumeReservationType
1502 1503 1504 |
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1502 def consume_reservation_type @consume_reservation_type end |
#key ⇒ String
Optional. Corresponds to the label key of a reservation resource. To target a
RESERVATION_SPECIFIC by name, use compute.googleapis.com/reservation-name as
the key and specify the name of your reservation as its value.
Corresponds to the JSON property key
1509 1510 1511 |
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1509 def key @key end |
#values ⇒ Array<String>
Optional. 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
1517 1518 1519 |
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1517 def values @values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1524 1525 1526 1527 1528 |
# File 'lib/google/apis/notebooks_v2/classes.rb', line 1524 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 |