@Stability(value=Stable)
public static interface CfnLaunchConfiguration.BlockDeviceMappingProperty
extends software.amazon.jsii.JsiiSerializable
Each instance that is launched has an associated root device volume, either an Amazon EBS volume or an instance store volume. You can use block device mappings to specify additional EBS volumes or instance store volumes to attach to an instance when it is launched.
For more information, see Example block device mapping in the Amazon EC2 User Guide for Linux Instances .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.autoscaling.*;
BlockDeviceMappingProperty blockDeviceMappingProperty = BlockDeviceMappingProperty.builder()
.deviceName("deviceName")
// the properties below are optional
.ebs(BlockDeviceProperty.builder()
.deleteOnTermination(false)
.encrypted(false)
.iops(123)
.snapshotId("snapshotId")
.throughput(123)
.volumeSize(123)
.volumeType("volumeType")
.build())
.noDevice(false)
.virtualName("virtualName")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder
A builder for
CfnLaunchConfiguration.BlockDeviceMappingProperty |
static class |
CfnLaunchConfiguration.BlockDeviceMappingProperty.Jsii$Proxy
An implementation for
CfnLaunchConfiguration.BlockDeviceMappingProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder |
builder() |
String |
getDeviceName()
The device name exposed to the EC2 instance (for example, `/dev/sdh` or `xvdh` ).
|
default Object |
getEbs()
Parameters used to automatically set up EBS volumes when an instance is launched.
|
default Object |
getNoDevice()
Setting this value to `true` suppresses the specified device included in the block device mapping of the AMI.
|
default String |
getVirtualName()
The name of the virtual device.
|
@Stability(value=Stable) @NotNull String getDeviceName()
For more information, see Device naming on Linux instances in the Amazon EC2 User Guide for Linux Instances .
@Stability(value=Stable) @Nullable default Object getEbs()
You can specify either VirtualName or Ebs , but not both.
@Stability(value=Stable) @Nullable default Object getNoDevice()
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.
If you specify NoDevice , you cannot specify Ebs .
@Stability(value=Stable) @Nullable default String getVirtualName()
The name must be in the form ephemeral X where X is a number starting from zero (0), for example, ephemeral0 .
You can specify either VirtualName or Ebs , but not both.
@Stability(value=Stable) static CfnLaunchConfiguration.BlockDeviceMappingProperty.Builder builder()
Copyright © 2022. All rights reserved.