BlockDevice

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

Bases: object

Block device.

Parameters
  • device_name (str) – The device name exposed to the EC2 instance. Supply a value like /dev/sdh, xvdh.

  • volume (BlockDeviceVolume) – 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).

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

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

# block_device_volume: autoscaling.BlockDeviceVolume

block_device = autoscaling.BlockDevice(
    device_name="deviceName",
    volume=block_device_volume,

    # the properties below are optional
    mapping_enabled=False
)

Attributes

device_name

The device name exposed to the EC2 instance.

Supply a value like /dev/sdh, xvdh.

See

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

Return type

str

mapping_enabled

(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

Deprecated

use BlockDeviceVolume.noDevice() as the volume to supress a mapping.

Stability

deprecated

Return type

Optional[bool]

volume

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).

Return type

BlockDeviceVolume