Class: AWSCDK::EC2::CfnEC2Fleet::BlockDeviceMappingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnEC2Fleet::BlockDeviceMappingProperty
- Defined in:
- ec2/cfn_ec2_fleet.rb
Overview
Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.
Instance Attribute Summary collapse
-
#device_name ⇒ String?
readonly
The device name.
-
#ebs ⇒ AWSCDK::IResolvable, ...
readonly
Parameters used to automatically set up EBS volumes when the instance is launched.
-
#no_device ⇒ String?
readonly
To omit the device from the block device mapping, specify an empty string.
-
#virtual_name ⇒ String?
readonly
The virtual device name (
ephemeralN).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(device_name: nil, ebs: nil, no_device: nil, virtual_name: nil) ⇒ BlockDeviceMappingProperty
constructor
A new instance of BlockDeviceMappingProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(device_name: nil, ebs: nil, no_device: nil, virtual_name: nil) ⇒ BlockDeviceMappingProperty
Returns a new instance of BlockDeviceMappingProperty.
869 870 871 872 873 874 875 876 877 878 |
# File 'ec2/cfn_ec2_fleet.rb', line 869 def initialize(device_name: nil, ebs: nil, no_device: nil, virtual_name: nil) @device_name = device_name Jsii::Type.check_type(@device_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deviceName") unless @device_name.nil? @ebs = ebs.is_a?(Hash) ? ::AWSCDK::EC2::CfnEC2Fleet::EbsBlockDeviceProperty.new(**ebs.transform_keys(&:to_sym)) : ebs Jsii::Type.check_type(@ebs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuRUMyRmxlZXQuRWJzQmxvY2tEZXZpY2VQcm9wZXJ0eSJ9XX19")), "ebs") unless @ebs.nil? @no_device = no_device Jsii::Type.check_type(@no_device, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "noDevice") unless @no_device.nil? @virtual_name = virtual_name Jsii::Type.check_type(@virtual_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "virtualName") unless @virtual_name.nil? end |
Instance Attribute Details
#device_name ⇒ String? (readonly)
The device name.
For available device names, see Device names for volumes .
886 887 888 |
# File 'ec2/cfn_ec2_fleet.rb', line 886 def device_name @device_name end |
#ebs ⇒ AWSCDK::IResolvable, ... (readonly)
Parameters used to automatically set up EBS volumes when the instance is launched.
891 892 893 |
# File 'ec2/cfn_ec2_fleet.rb', line 891 def ebs @ebs end |
#no_device ⇒ String? (readonly)
To omit the device from the block device mapping, specify an empty string.
When this property is specified, the device is removed from the block device mapping regardless of the assigned value.
898 899 900 |
# File 'ec2/cfn_ec2_fleet.rb', line 898 def no_device @no_device end |
#virtual_name ⇒ String? (readonly)
The virtual device name ( ephemeral N).
Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1 . The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
909 910 911 |
# File 'ec2/cfn_ec2_fleet.rb', line 909 def virtual_name @virtual_name end |
Class Method Details
.jsii_properties ⇒ Object
911 912 913 914 915 916 917 918 |
# File 'ec2/cfn_ec2_fleet.rb', line 911 def self.jsii_properties { :device_name => "deviceName", :ebs => "ebs", :no_device => "noDevice", :virtual_name => "virtualName", } end |
Instance Method Details
#to_jsii ⇒ Object
920 921 922 923 924 925 926 927 928 929 |
# File 'ec2/cfn_ec2_fleet.rb', line 920 def to_jsii result = {} result.merge!({ "deviceName" => @device_name, "ebs" => @ebs, "noDevice" => @no_device, "virtualName" => @virtual_name, }) result.compact end |