Interface BlockDevice

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
BlockDevice.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:45.197Z") @Stability(Stable) public interface BlockDevice extends software.amazon.jsii.JsiiSerializable
Block device.

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.*;
 BlockDeviceVolume blockDeviceVolume;
 BlockDevice blockDevice = BlockDevice.builder()
         .deviceName("deviceName")
         .volume(blockDeviceVolume)
         // the properties below are optional
         .mappingEnabled(false)
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for BlockDevice
    static final class 
    An implementation for BlockDevice
  • Method Summary

    Modifier and Type
    Method
    Description
     
    The device name exposed to the EC2 instance.
    default Boolean
    Deprecated.
    use BlockDeviceVolume.noDevice() as the volume to supress a mapping.
    Defines the block device volume, to be either an Amazon EBS volume or an ephemeral instance store volume.

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Method Details

    • getDeviceName

      @Stability(Stable) @NotNull String getDeviceName()
      The device name exposed to the EC2 instance.

      Supply a value like /dev/sdh, xvdh.

      See Also:
    • getVolume

      @Stability(Stable) @NotNull BlockDeviceVolume getVolume()
      Defines the block device volume, to be either an Amazon EBS volume or an ephemeral instance store volume.

      Supply a value like BlockDeviceVolume.ebs(15), BlockDeviceVolume.ephemeral(0).

    • getMappingEnabled

      @Stability(Deprecated) @Deprecated @Nullable default Boolean getMappingEnabled()
      Deprecated.
      use BlockDeviceVolume.noDevice() as the volume to supress a mapping.
      (deprecated) 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.

      Default: true - device mapping is left untouched

    • builder

      @Stability(Stable) static BlockDevice.Builder builder()
      Returns:
      a BlockDevice.Builder of BlockDevice