Class: AWSCDK::Autoscaling::BlockDevice
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::BlockDevice
- Defined in:
- autoscaling/block_device.rb
Overview
Block device.
Instance Attribute Summary collapse
-
#device_name ⇒ String
readonly
The device name exposed to the EC2 instance.
-
#volume ⇒ AWSCDK::Autoscaling::BlockDeviceVolume
readonly
Defines the block device volume, to be either an Amazon EBS volume or an ephemeral instance store volume.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(device_name:, volume:) ⇒ BlockDevice
constructor
A new instance of BlockDevice.
- #to_jsii ⇒ Object
Constructor Details
#initialize(device_name:, volume:) ⇒ BlockDevice
Returns a new instance of BlockDevice.
9 10 11 12 13 14 |
# File 'autoscaling/block_device.rb', line 9 def initialize(device_name:, volume:) @device_name = device_name Jsii::Type.check_type(@device_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deviceName") @volume = volume Jsii::Type.check_type(@volume, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQmxvY2tEZXZpY2VWb2x1bWUifQ==")), "volume") end |
Instance Attribute Details
#device_name ⇒ String (readonly)
The device name exposed to the EC2 instance.
Supply a value like /dev/sdh, xvdh.
22 23 24 |
# File 'autoscaling/block_device.rb', line 22 def device_name @device_name end |
#volume ⇒ AWSCDK::Autoscaling::BlockDeviceVolume (readonly)
Defines the block device volume, to be either an Amazon EBS volume or an ephemeral instance store volume.
Supply a value like BlockDeviceVolume.ebs(15), BlockDeviceVolume.ephemeral(0).
28 29 30 |
# File 'autoscaling/block_device.rb', line 28 def volume @volume end |
Class Method Details
.jsii_properties ⇒ Object
30 31 32 33 34 35 |
# File 'autoscaling/block_device.rb', line 30 def self.jsii_properties { :device_name => "deviceName", :volume => "volume", } end |
Instance Method Details
#to_jsii ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'autoscaling/block_device.rb', line 37 def to_jsii result = {} result.merge!({ "deviceName" => @device_name, "volume" => @volume, }) result.compact end |