Class: AWSCDK::EC2::CfnInstance::ElasticInferenceAcceleratorProperty

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

Overview

Amazon Elastic Inference is no longer available.

Specifies the Elastic Inference Accelerator for the instance.

ElasticInferenceAccelerator is a property of the AWS::EC2::Instance resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, count: nil) ⇒ ElasticInferenceAcceleratorProperty

Returns a new instance of ElasticInferenceAcceleratorProperty.

Parameters:

  • type (String)

    The type of elastic inference accelerator.

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

    The number of elastic inference accelerators to attach to the instance.



1538
1539
1540
1541
1542
1543
# File 'ec2/cfn_instance.rb', line 1538

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

Instance Attribute Details

#countNumeric? (readonly)

The number of elastic inference accelerators to attach to the instance.



1556
1557
1558
# File 'ec2/cfn_instance.rb', line 1556

def count
  @count
end

#typeString (readonly)

The type of elastic inference accelerator.

The possible values are eia1.medium , eia1.large , eia1.xlarge , eia2.medium , eia2.large , and eia2.xlarge .



1551
1552
1553
# File 'ec2/cfn_instance.rb', line 1551

def type
  @type
end

Class Method Details

.jsii_propertiesObject



1558
1559
1560
1561
1562
1563
# File 'ec2/cfn_instance.rb', line 1558

def self.jsii_properties
  {
    :type => "type",
    :count => "count",
  }
end

Instance Method Details

#to_jsiiObject



1565
1566
1567
1568
1569
1570
1571
1572
# File 'ec2/cfn_instance.rb', line 1565

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