Class: AWSCDK::EC2::CfnLaunchTemplate::AcceleratorCountProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnLaunchTemplate::AcceleratorCountProperty
- Defined in:
- ec2/cfn_launch_template.rb
Overview
The minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips) on an instance.
Instance Attribute Summary collapse
-
#max ⇒ Numeric?
readonly
The maximum number of accelerators.
-
#min ⇒ Numeric?
readonly
The minimum number of accelerators.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max: nil, min: nil) ⇒ AcceleratorCountProperty
constructor
A new instance of AcceleratorCountProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max: nil, min: nil) ⇒ AcceleratorCountProperty
Returns a new instance of AcceleratorCountProperty.
588 589 590 591 592 593 |
# File 'ec2/cfn_launch_template.rb', line 588 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
#max ⇒ Numeric? (readonly)
The maximum number of accelerators.
To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0 .
601 602 603 |
# File 'ec2/cfn_launch_template.rb', line 601 def max @max end |
#min ⇒ Numeric? (readonly)
The minimum number of accelerators.
To specify no minimum limit, omit this parameter.
608 609 610 |
# File 'ec2/cfn_launch_template.rb', line 608 def min @min end |
Class Method Details
.jsii_properties ⇒ Object
610 611 612 613 614 615 |
# File 'ec2/cfn_launch_template.rb', line 610 def self.jsii_properties { :max => "max", :min => "min", } end |
Instance Method Details
#to_jsii ⇒ Object
617 618 619 620 621 622 623 624 |
# File 'ec2/cfn_launch_template.rb', line 617 def to_jsii result = {} result.merge!({ "max" => @max, "min" => @min, }) result.compact end |