public static final class CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder
extends java.lang.Object
CfnLaunchConfiguration.BlockDeviceMappingProperty
Constructor and Description |
---|
Builder() |
public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder deviceName(java.lang.String deviceName)
CfnLaunchConfiguration.BlockDeviceMappingProperty.getDeviceName()
deviceName
- The device name assigned to the volume (for example, `/dev/sdh` or `xvdh` ). This parameter is required.
For more information, see Device naming on Linux instances in the Amazon EC2 User Guide for Linux Instances .
To define a block device mapping, set the device name and exactly one of the following properties:
Ebs
,NoDevice
, orVirtualName
.
this
public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder ebs(IResolvable ebs)
CfnLaunchConfiguration.BlockDeviceMappingProperty.getEbs()
ebs
- Information to attach an EBS volume to an instance at launch.this
public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder ebs(CfnLaunchConfiguration.BlockDeviceProperty ebs)
CfnLaunchConfiguration.BlockDeviceMappingProperty.getEbs()
ebs
- Information to attach an EBS volume to an instance at launch.this
public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder noDevice(java.lang.Boolean noDevice)
CfnLaunchConfiguration.BlockDeviceMappingProperty.getNoDevice()
noDevice
- Setting this value to `true` prevents a volume that is included in the block device mapping of the AMI from being mapped to the specified device name at launch.
If NoDevice
is true
for the root device, instances might fail the EC2 health check. In that case, Amazon EC2 Auto Scaling launches replacement instances.this
public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder noDevice(IResolvable noDevice)
CfnLaunchConfiguration.BlockDeviceMappingProperty.getNoDevice()
noDevice
- Setting this value to `true` prevents a volume that is included in the block device mapping of the AMI from being mapped to the specified device name at launch.
If NoDevice
is true
for the root device, instances might fail the EC2 health check. In that case, Amazon EC2 Auto Scaling launches replacement instances.this
public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder virtualName(java.lang.String virtualName)
CfnLaunchConfiguration.BlockDeviceMappingProperty.getVirtualName()
virtualName
- The name of the instance store volume (virtual device) to attach to an instance at launch.
The name must be in the form ephemeral X where X is a number starting from zero (0), for example, ephemeral0
.this
public CfnLaunchConfiguration.BlockDeviceMappingProperty build()
CfnLaunchConfiguration.BlockDeviceMappingProperty
java.lang.NullPointerException
- if any required attribute was not provided