BlockDevice

class aws_cdk.aws_ec2.BlockDevice(*, device_name, volume, mapping_enabled=None)

Bases: object

__init__(*, device_name, volume, mapping_enabled=None)

Block device.

Parameters
  • device_name (str) – The device name exposed to the EC2 instance.

  • volume (BlockDeviceVolume) – Defines the block device volume, to be either an Amazon EBS volume or an ephemeral instance store volume.

  • mapping_enabled (Optional[bool]) – 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

Return type

None

Attributes

device_name

The device name exposed to the EC2 instance.

see :see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html

Example:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
"/dev/sdh" , "xvdh"
Return type

str

mapping_enabled

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 :default: true - device mapping is left untouched

Return type

Optional[bool]

volume

Defines the block device volume, to be either an Amazon EBS volume or an ephemeral instance store volume.

Example:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
BlockDeviceVolume.ebs(15) , BlockDeviceVolume.ephemeral(0)
Return type

BlockDeviceVolume