Table of Contents

Class BlockDevice

Namespace
Amazon.CDK.AWS.AutoScaling
Assembly
Amazon.CDK.AWS.AutoScaling.dll

Block device.

public class BlockDevice : IBlockDevice
Inheritance
BlockDevice
Implements
Inherited Members

Examples

// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK.AWS.AutoScaling;

            BlockDeviceVolume blockDeviceVolume;

            var blockDevice = new BlockDevice {
                DeviceName = "deviceName",
                Volume = blockDeviceVolume,

                // the properties below are optional
                MappingEnabled = false
            };

Remarks

ExampleMetadata: fixture=_generated

Constructors

BlockDevice()

public BlockDevice()

Properties

DeviceName

The device name exposed to the EC2 instance.

public string DeviceName { get; set; }

Property Value

string

Remarks

MappingEnabled

(deprecated) If false, the device mapping will be suppressed.

[Obsolete("use `BlockDeviceVolume.noDevice()` as the volume to supress a mapping.")]
public bool? MappingEnabled { get; set; }

Property Value

bool?

Remarks

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

Stability: Deprecated

Volume

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

public BlockDeviceVolume Volume { get; set; }

Property Value

BlockDeviceVolume

Remarks

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