public static final class BlockDevice.Builder
extends java.lang.Object
BlockDevice
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
BlockDevice |
build()
Builds the configured instance.
|
BlockDevice.Builder |
deviceName(java.lang.String deviceName)
Sets the value of
BlockDevice.getDeviceName() |
BlockDevice.Builder |
mappingEnabled(java.lang.Boolean mappingEnabled)
Deprecated.
use `BlockDeviceVolume.noDevice()` as the volume to supress a mapping.
|
BlockDevice.Builder |
volume(BlockDeviceVolume volume)
Sets the value of
BlockDevice.getVolume() |
public BlockDevice.Builder deviceName(java.lang.String deviceName)
BlockDevice.getDeviceName()
deviceName
- The device name exposed to the EC2 instance. This parameter is required.
Supply a value like /dev/sdh
, xvdh
.this
public BlockDevice.Builder volume(BlockDeviceVolume volume)
BlockDevice.getVolume()
volume
- Defines the block device volume, to be either an Amazon EBS volume or an ephemeral instance store volume. This parameter is required.
Supply a value like BlockDeviceVolume.ebs(15)
, BlockDeviceVolume.ephemeral(0)
.this
@Deprecated public BlockDevice.Builder mappingEnabled(java.lang.Boolean mappingEnabled)
BlockDevice.getMappingEnabled()
mappingEnabled
- If false, the device mapping will be suppressed.
If set to false for the root device, the instance might fail the Amazon EC2 health check.
Amazon EC2 Auto Scaling launches a replacement instance if the instance fails the health check.this
public BlockDevice build()
BlockDevice
java.lang.NullPointerException
- if any required attribute was not provided