Class CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLaunchConfiguration.BlockDeviceMappingProperty>
- Enclosing interface:
- CfnLaunchConfiguration.BlockDeviceMappingProperty
@Stability(Stable)
public static final class CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLaunchConfiguration.BlockDeviceMappingProperty>
A builder for
CfnLaunchConfiguration.BlockDeviceMappingProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.deviceName
(String deviceName) Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getDeviceName()
ebs
(IResolvable ebs) Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getEbs()
Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getEbs()
Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getNoDevice()
noDevice
(IResolvable noDevice) Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getNoDevice()
virtualName
(String virtualName) Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getVirtualName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
deviceName
@Stability(Stable) public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder deviceName(String deviceName) Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getDeviceName()
- Parameters:
deviceName
- The device name assigned to the volume (for example,/dev/sdh
orxvdh
). 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
.- Returns:
this
-
ebs
@Stability(Stable) public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder ebs(IResolvable ebs) Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getEbs()
- Parameters:
ebs
- Information to attach an EBS volume to an instance at launch.- Returns:
this
-
ebs
@Stability(Stable) public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder ebs(CfnLaunchConfiguration.BlockDeviceProperty ebs) Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getEbs()
- Parameters:
ebs
- Information to attach an EBS volume to an instance at launch.- Returns:
this
-
noDevice
@Stability(Stable) public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder noDevice(Boolean noDevice) Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getNoDevice()
- Parameters:
noDevice
- Setting this value totrue
prevents a volume that is included in the block device mapping of the AMI from being mapped to the specified device name at launch. IfNoDevice
istrue
for the root device, instances might fail the EC2 health check. In that case, Amazon EC2 Auto Scaling launches replacement instances.- Returns:
this
-
noDevice
@Stability(Stable) public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder noDevice(IResolvable noDevice) Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getNoDevice()
- Parameters:
noDevice
- Setting this value totrue
prevents a volume that is included in the block device mapping of the AMI from being mapped to the specified device name at launch. IfNoDevice
istrue
for the root device, instances might fail the EC2 health check. In that case, Amazon EC2 Auto Scaling launches replacement instances.- Returns:
this
-
virtualName
@Stability(Stable) public CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder virtualName(String virtualName) Sets the value ofCfnLaunchConfiguration.BlockDeviceMappingProperty.getVirtualName()
- Parameters:
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
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLaunchConfiguration.BlockDeviceMappingProperty>
- Returns:
- a new instance of
CfnLaunchConfiguration.BlockDeviceMappingProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-