Class: Google::Apis::ComputeAlpha::HaControllerZoneConfigurationReservationAffinity

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

Overview

Specifies the reservations that this instance can consume from. This message should be an exact copy of the Instances representation of AllocationAffinity. LINT.IfChange(HaControllerAllocationAffinityMixer)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HaControllerZoneConfigurationReservationAffinity

Returns a new instance of HaControllerZoneConfigurationReservationAffinity.



17120
17121
17122
# File 'lib/google/apis/compute_alpha/classes.rb', line 17120

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)


17103
17104
17105
# File 'lib/google/apis/compute_alpha/classes.rb', line 17103

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)


17110
17111
17112
# File 'lib/google/apis/compute_alpha/classes.rb', line 17110

def key
  @key
end

#valuesArray<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

Returns:

  • (Array<String>)


17118
17119
17120
# File 'lib/google/apis/compute_alpha/classes.rb', line 17118

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



17125
17126
17127
17128
17129
# File 'lib/google/apis/compute_alpha/classes.rb', line 17125

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