Class: AWSCDK::EC2::CfnSpotFleet::BlockDeviceMappingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnSpotFleet::BlockDeviceMappingProperty
- Defined in:
- ec2/cfn_spot_fleet.rb
Overview
Specifies a block device mapping.
You can specify Ebs or VirtualName , but not both.
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:, ebs: nil, no_device: nil, virtual_name: nil) ⇒ BlockDeviceMappingProperty
constructor
A new instance of BlockDeviceMappingProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(device_name:, ebs: nil, no_device: nil, virtual_name: nil) ⇒ BlockDeviceMappingProperty
Returns a new instance of BlockDeviceMappingProperty.
714 715 716 717 718 719 720 721 722 723 |
# File 'ec2/cfn_spot_fleet.rb', line 714 def initialize(device_name:, 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") @ebs = ebs.is_a?(Hash) ? ::AWSCDK::EC2::CfnSpotFleet::EbsBlockDeviceProperty.new(**ebs.transform_keys(&:to_sym)) : ebs Jsii::Type.check_type(@ebs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuU3BvdEZsZWV0LkVic0Jsb2NrRGV2aWNlUHJvcGVydHkifV19fQ==")), "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 .
731 732 733 |
# File 'ec2/cfn_spot_fleet.rb', line 731 def device_name @device_name end |
#ebs ⇒ AWSCDK::IResolvable, ... (readonly)
Parameters used to automatically set up EBS volumes when the instance is launched.
736 737 738 |
# File 'ec2/cfn_spot_fleet.rb', line 736 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.
743 744 745 |
# File 'ec2/cfn_spot_fleet.rb', line 743 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.
754 755 756 |
# File 'ec2/cfn_spot_fleet.rb', line 754 def virtual_name @virtual_name end |
Class Method Details
.jsii_properties ⇒ Object
756 757 758 759 760 761 762 763 |
# File 'ec2/cfn_spot_fleet.rb', line 756 def self.jsii_properties { :device_name => "deviceName", :ebs => "ebs", :no_device => "noDevice", :virtual_name => "virtualName", } end |
Instance Method Details
#to_jsii ⇒ Object
765 766 767 768 769 770 771 772 773 774 |
# File 'ec2/cfn_spot_fleet.rb', line 765 def to_jsii result = {} result.merge!({ "deviceName" => @device_name, "ebs" => @ebs, "noDevice" => @no_device, "virtualName" => @virtual_name, }) result.compact end |