Class: AWSCDK::Deadline::CfnFleet::AcceleratorCountRangeProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
deadline/cfn_fleet.rb

Overview

Defines the maximum and minimum number of GPU accelerators required for a worker instance..

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(min:, max: nil) ⇒ AcceleratorCountRangeProperty

Returns a new instance of AcceleratorCountRangeProperty.

Parameters:

  • min (Numeric)

    The minimum number of GPU accelerators in the worker host.

  • max (Numeric, nil) (defaults to: nil)

    The maximum number of GPU accelerators in the worker host.



722
723
724
725
726
727
# File 'deadline/cfn_fleet.rb', line 722

def initialize(min:, max: nil)
  @min = min
  Jsii::Type.check_type(@min, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "min")
  @max = max
  Jsii::Type.check_type(@max, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "max") unless @max.nil?
end

Instance Attribute Details

#maxNumeric? (readonly)

The maximum number of GPU accelerators in the worker host.



738
739
740
# File 'deadline/cfn_fleet.rb', line 738

def max
  @max
end

#minNumeric (readonly)

The minimum number of GPU accelerators in the worker host.



733
734
735
# File 'deadline/cfn_fleet.rb', line 733

def min
  @min
end

Class Method Details

.jsii_propertiesObject



740
741
742
743
744
745
# File 'deadline/cfn_fleet.rb', line 740

def self.jsii_properties
  {
    :min => "min",
    :max => "max",
  }
end

Instance Method Details

#to_jsiiObject



747
748
749
750
751
752
753
754
# File 'deadline/cfn_fleet.rb', line 747

def to_jsii
  result = {}
  result.merge!({
    "min" => @min,
    "max" => @max,
  })
  result.compact
end