Class: AWSCDK::EC2::CfnLaunchTemplate::VCpuCountProperty

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

Overview

The minimum and maximum number of vCPUs.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of VCpuCountProperty.

Parameters:

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

    The maximum number of vCPUs.

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

    The minimum number of vCPUs.



3815
3816
3817
3818
3819
3820
# File 'ec2/cfn_launch_template.rb', line 3815

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 vCPUs.

To specify no maximum limit, omit this parameter.



3828
3829
3830
# File 'ec2/cfn_launch_template.rb', line 3828

def max
  @max
end

#minNumeric? (readonly)

The minimum number of vCPUs.

To specify no minimum limit, specify 0 .



3835
3836
3837
# File 'ec2/cfn_launch_template.rb', line 3835

def min
  @min
end

Class Method Details

.jsii_propertiesObject



3837
3838
3839
3840
3841
3842
# File 'ec2/cfn_launch_template.rb', line 3837

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

Instance Method Details

#to_jsiiObject



3844
3845
3846
3847
3848
3849
3850
3851
# File 'ec2/cfn_launch_template.rb', line 3844

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