Show / Hide Table of Contents

Class BlockDeviceVolume

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

Inheritance
System.Object
BlockDeviceVolume
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class BlockDeviceVolume : DeputyBase
Syntax (vb)
Public Class BlockDeviceVolume
    Inherits DeputyBase
Remarks

ExampleMetadata: infused

Examples
Vpc vpc;
InstanceType instanceType;
IMachineImage machineImage;


new Instance(this, "Instance", new InstanceProps {
    Vpc = vpc,
    InstanceType = instanceType,
    MachineImage = machineImage,

    // ...

    BlockDevices = new [] { new BlockDevice {
        DeviceName = "/dev/sda1",
        Volume = BlockDeviceVolume.Ebs(50)
    }, new BlockDevice {
        DeviceName = "/dev/sdm",
        Volume = BlockDeviceVolume.Ebs(100)
    } }
});

Synopsis

Constructors

BlockDeviceVolume(IEbsDeviceProps, String)
BlockDeviceVolume(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

BlockDeviceVolume(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

Properties

EbsDevice

EBS device info.

VirtualName

Virtual device name.

Methods

Ebs(Double, IEbsDeviceOptions)

Creates a new Elastic Block Storage device.

EbsFromSnapshot(String, IEbsDeviceSnapshotOptions)

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

Ephemeral(Double)

Creates a virtual, ephemeral device.

Constructors

BlockDeviceVolume(IEbsDeviceProps, String)

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

EBS device info.

virtualName System.String

Virtual device name.

BlockDeviceVolume(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected BlockDeviceVolume(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

BlockDeviceVolume(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected BlockDeviceVolume(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

Properties

EbsDevice

EBS device info.

public virtual IEbsDeviceProps EbsDevice { get; }
Property Value

IEbsDeviceProps

VirtualName

Virtual device name.

public virtual string VirtualName { get; }
Property Value

System.String

Methods

Ebs(Double, IEbsDeviceOptions)

Creates a new Elastic Block Storage device.

public static BlockDeviceVolume Ebs(double volumeSize, IEbsDeviceOptions options = null)
Parameters
volumeSize System.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 System.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 System.Double

the volume index.

Returns

BlockDeviceVolume

Remarks

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

Back to top Generated by DocFX