Interface CfnInstance.BlockDeviceMappingProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnInstance.BlockDeviceMappingProperty.Jsii$Proxy
Enclosing class:
CfnInstance

@Stability(Stable) public static interface CfnInstance.BlockDeviceMappingProperty extends software.amazon.jsii.JsiiSerializable
Specifies a block device mapping for an instance.

You must specify exactly one of the following properties: VirtualName , Ebs , or NoDevice .

BlockDeviceMapping is a property of the AWS::EC2::Instance resource.

After the instance is running, you can modify only the DeleteOnTermination parameter for the attached volumes without interrupting the instance. Modifying any other parameter results in instance replacement .

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.ec2.*;
 BlockDeviceMappingProperty blockDeviceMappingProperty = BlockDeviceMappingProperty.builder()
         .deviceName("deviceName")
         // the properties below are optional
         .ebs(EbsProperty.builder()
                 .deleteOnTermination(false)
                 .encrypted(false)
                 .iops(123)
                 .kmsKeyId("kmsKeyId")
                 .snapshotId("snapshotId")
                 .volumeSize(123)
                 .volumeType("volumeType")
                 .build())
         .noDevice(NoDeviceProperty.builder().build())
         .virtualName("virtualName")
         .build();
 

See Also: