Class: AWSCDK::OpsWorks::CfnInstance::BlockDeviceMappingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::OpsWorks::CfnInstance::BlockDeviceMappingProperty
- Defined in:
- ops_works/cfn_instance.rb
Overview
Instance Attribute Summary collapse
-
#device_name ⇒ String?
readonly
The device name that is exposed to the instance, such as
/dev/sdh. -
#ebs ⇒ AWSCDK::IResolvable, ...
readonly
An
EBSBlockDevicethat defines how to configure an Amazon EBS volume when the instance is launched. -
#no_device ⇒ String?
readonly
Suppresses the specified device included in the AMI's block device mapping.
-
#virtual_name ⇒ String?
readonly
The virtual device name.
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.
806 807 808 809 810 811 812 813 814 815 |
# File 'ops_works/cfn_instance.rb', line 806 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::OpsWorks::CfnInstance::EbsBlockDeviceProperty.new(**ebs.transform_keys(&:to_sym)) : ebs Jsii::Type.check_type(@ebs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vcHN3b3Jrcy5DZm5JbnN0YW5jZS5FYnNCbG9ja0RldmljZVByb3BlcnR5In1dfX0=")), "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 that is exposed to the instance, such as /dev/sdh .
For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.
823 824 825 |
# File 'ops_works/cfn_instance.rb', line 823 def device_name @device_name end |
#ebs ⇒ AWSCDK::IResolvable, ... (readonly)
An EBSBlockDevice that defines how to configure an Amazon EBS volume when the instance is launched.
You can specify either the VirtualName or Ebs , but not both.
830 831 832 |
# File 'ops_works/cfn_instance.rb', line 830 def ebs @ebs end |
#no_device ⇒ String? (readonly)
Suppresses the specified device included in the AMI's block device mapping.
835 836 837 |
# File 'ops_works/cfn_instance.rb', line 835 def no_device @no_device end |
#virtual_name ⇒ String? (readonly)
The virtual device name.
For more information, see BlockDeviceMapping . You can specify either the VirtualName or Ebs , but not both.
842 843 844 |
# File 'ops_works/cfn_instance.rb', line 842 def virtual_name @virtual_name end |
Class Method Details
.jsii_properties ⇒ Object
844 845 846 847 848 849 850 851 |
# File 'ops_works/cfn_instance.rb', line 844 def self.jsii_properties { :device_name => "deviceName", :ebs => "ebs", :no_device => "noDevice", :virtual_name => "virtualName", } end |
Instance Method Details
#to_jsii ⇒ Object
853 854 855 856 857 858 859 860 861 862 |
# File 'ops_works/cfn_instance.rb', line 853 def to_jsii result = {} result.merge!({ "deviceName" => @device_name, "ebs" => @ebs, "noDevice" => @no_device, "virtualName" => @virtual_name, }) result.compact end |