Class: Google::Apis::DataprocV1::InstanceSelection

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

Overview

Defines machines types and a rank to which the machines types belong.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstanceSelection

Returns a new instance of InstanceSelection.



2422
2423
2424
# File 'lib/google/apis/dataproc_v1/classes.rb', line 2422

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#machine_typesArray<String>

Optional. Full machine-type names, e.g. "n1-standard-16". Corresponds to the JSON property machineTypes

Returns:

  • (Array<String>)


2412
2413
2414
# File 'lib/google/apis/dataproc_v1/classes.rb', line 2412

def machine_types
  @machine_types
end

#rankFixnum

Optional. Preference of this instance selection. Lower number means higher preference. Dataproc will first try to create a VM based on the machine-type with priority rank and fallback to next rank based on availability. Machine types and instance selections with the same priority have the same preference. Corresponds to the JSON property rank

Returns:

  • (Fixnum)


2420
2421
2422
# File 'lib/google/apis/dataproc_v1/classes.rb', line 2420

def rank
  @rank
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2427
2428
2429
2430
# File 'lib/google/apis/dataproc_v1/classes.rb', line 2427

def update!(**args)
  @machine_types = args[:machine_types] if args.key?(:machine_types)
  @rank = args[:rank] if args.key?(:rank)
end