Class: AWSCDK::EC2::CfnSpotFleet::AcceleratorCountRequestProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_spot_fleet.rb

Overview

The minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips) on an instance.

To exclude accelerator-enabled instance types, set Max to 0 .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of AcceleratorCountRequestProperty.

Parameters:

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

    The maximum number of accelerators.

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

    The minimum number of accelerators.



530
531
532
533
534
535
# File 'ec2/cfn_spot_fleet.rb', line 530

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

Instance Attribute Details

#maxNumeric? (readonly)

The maximum number of accelerators.

To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0 .



543
544
545
# File 'ec2/cfn_spot_fleet.rb', line 543

def max
  @max
end

#minNumeric? (readonly)

The minimum number of accelerators.

To specify no minimum limit, omit this parameter.



550
551
552
# File 'ec2/cfn_spot_fleet.rb', line 550

def min
  @min
end

Class Method Details

.jsii_propertiesObject



552
553
554
555
556
557
# File 'ec2/cfn_spot_fleet.rb', line 552

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

Instance Method Details

#to_jsiiObject



559
560
561
562
563
564
565
566
# File 'ec2/cfn_spot_fleet.rb', line 559

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