Table of Contents

Class BlockDeviceVolume

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

Describes a block device mapping for an EC2 instance or Auto Scaling group.

public class BlockDeviceVolume : DeputyBase
Inheritance
BlockDeviceVolume

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;

            var blockDeviceVolume = BlockDeviceVolume.Ebs(123, new EbsDeviceOptions {
                DeleteOnTermination = false,
                Encrypted = false,
                Iops = 123,
                VolumeType = EbsDeviceVolumeType.STANDARD
            });

Remarks

ExampleMetadata: fixture=_generated

Constructors

BlockDeviceVolume(IEbsDeviceProps?, string?)

public BlockDeviceVolume(IEbsDeviceProps? ebsDevice = null, string? virtualName = null)

Parameters

ebsDevice IEbsDeviceProps

EBS device info.

virtualName string

Virtual device name.

Properties

EbsDevice

EBS device info.

public virtual IEbsDeviceProps? EbsDevice { get; }

Property Value

IEbsDeviceProps

VirtualName

Virtual device name.

public virtual string? VirtualName { get; }

Property Value

string

Methods

Ebs(double, IEbsDeviceOptions?)

Creates a new Elastic Block Storage device.

public static BlockDeviceVolume Ebs(double volumeSize, IEbsDeviceOptions? options = null)

Parameters

volumeSize double

The volume size, in Gibibytes (GiB).

options IEbsDeviceOptions

additional device options.

Returns

BlockDeviceVolume

EbsFromSnapshot(string, IEbsDeviceSnapshotOptions?)

Creates a new Elastic Block Storage device from an existing snapshot.

public static BlockDeviceVolume EbsFromSnapshot(string snapshotId, IEbsDeviceSnapshotOptions? options = null)

Parameters

snapshotId string

The snapshot ID of the volume to use.

options IEbsDeviceSnapshotOptions

additional device options.

Returns

BlockDeviceVolume

Ephemeral(double)

Creates a virtual, ephemeral device.

public static BlockDeviceVolume Ephemeral(double volumeIndex)

Parameters

volumeIndex double

the volume index.

Returns

BlockDeviceVolume

Remarks

The name will be in the form ephemeral{volumeIndex}.

NoDevice()

Supresses a volume mapping.

public static BlockDeviceVolume NoDevice()

Returns

BlockDeviceVolume