Class: AWSCDK::ECS::CfnCapacityProvider::AcceleratorCountRequestProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_capacity_provider.rb

Overview

The minimum and maximum number of accelerators (such as GPUs) for instance type selection.

This is used for workloads that require specific numbers of accelerators.

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.



581
582
583
584
585
586
# File 'ecs/cfn_capacity_provider.rb', line 581

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.

Instance types with more accelerators are excluded from selection.



594
595
596
# File 'ecs/cfn_capacity_provider.rb', line 594

def max
  @max
end

#minNumeric? (readonly)

The minimum number of accelerators.

Instance types with fewer accelerators are excluded from selection.



601
602
603
# File 'ecs/cfn_capacity_provider.rb', line 601

def min
  @min
end

Class Method Details

.jsii_propertiesObject



603
604
605
606
607
608
# File 'ecs/cfn_capacity_provider.rb', line 603

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

Instance Method Details

#to_jsiiObject



610
611
612
613
614
615
616
617
# File 'ecs/cfn_capacity_provider.rb', line 610

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