Interface CfnLaunchConfiguration.BlockDeviceMappingProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnLaunchConfiguration.BlockDeviceMappingProperty.Jsii$Proxy
- Enclosing class:
CfnLaunchConfiguration
BlockDeviceMapping
specifies a block device mapping for the BlockDeviceMappings
property of the AWS::AutoScaling::LaunchConfiguration resource.
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();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnLaunchConfiguration.BlockDeviceMappingProperty
static final class
An implementation forCfnLaunchConfiguration.BlockDeviceMappingProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
The device name assigned to the volume (for example,/dev/sdh
orxvdh
).default Object
getEbs()
Information to attach an EBS volume to an instance at launch.default Object
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.default String
The name of the instance store volume (virtual device) to attach to an instance at launch.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDeviceName
The device name assigned to the volume (for example,/dev/sdh
orxvdh
).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
.- See Also:
-
getEbs
Information to attach an EBS volume to an instance at launch.- See Also:
-
getNoDevice
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.If
NoDevice
istrue
for the root device, instances might fail the EC2 health check. In that case, Amazon EC2 Auto Scaling launches replacement instances.- See Also:
-
getVirtualName
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
.- See Also:
-
builder
-