Class: AWSCDK::ImageBuilder::CfnImageRecipe::InstanceBlockDeviceMappingProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
image_builder/cfn_image_recipe.rb

Overview

Defines block device mappings for the instance used to configure your image.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(device_name: nil, ebs: nil, no_device: nil, virtual_name: nil) ⇒ InstanceBlockDeviceMappingProperty

Returns a new instance of InstanceBlockDeviceMappingProperty.

Parameters:



939
940
941
942
943
944
945
946
947
948
# File 'image_builder/cfn_image_recipe.rb', line 939

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::ImageBuilder::CfnImageRecipe::EbsInstanceBlockDeviceSpecificationProperty.new(**ebs.transform_keys(&:to_sym)) : ebs
  Jsii::Type.check_type(@ebs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pbWFnZWJ1aWxkZXIuQ2ZuSW1hZ2VSZWNpcGUuRWJzSW5zdGFuY2VCbG9ja0RldmljZVNwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19")), "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_nameString? (readonly)

The device to which these mappings apply.



954
955
956
# File 'image_builder/cfn_image_recipe.rb', line 954

def device_name
  @device_name
end

#no_deviceString? (readonly)

Enter an empty string to remove a mapping from the parent image.

The following is an example of an empty string value in the NoDevice field.

NoDevice:""



968
969
970
# File 'image_builder/cfn_image_recipe.rb', line 968

def no_device
  @no_device
end

#virtual_nameString? (readonly)

Manages the instance ephemeral devices.



973
974
975
# File 'image_builder/cfn_image_recipe.rb', line 973

def virtual_name
  @virtual_name
end

Class Method Details

.jsii_propertiesObject



975
976
977
978
979
980
981
982
# File 'image_builder/cfn_image_recipe.rb', line 975

def self.jsii_properties
  {
    :device_name => "deviceName",
    :ebs => "ebs",
    :no_device => "noDevice",
    :virtual_name => "virtualName",
  }
end

Instance Method Details

#to_jsiiObject



984
985
986
987
988
989
990
991
992
993
# File 'image_builder/cfn_image_recipe.rb', line 984

def to_jsii
  result = {}
  result.merge!({
    "deviceName" => @device_name,
    "ebs" => @ebs,
    "noDevice" => @no_device,
    "virtualName" => @virtual_name,
  })
  result.compact
end