Class BlockDeviceVolume
Describes a block device mapping for an EC2 instance or Auto Scaling group.
Inheritance
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class BlockDeviceVolume : DeputyBase
Syntax (vb)
Public Class BlockDeviceVolume
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
Vpc vpc;
InstanceType instanceType;
IMachineImage machineImage;
var autoScalingGroup = new AutoScalingGroup(this, "ASG", new AutoScalingGroupProps {
Vpc = vpc,
InstanceType = instanceType,
MachineImage = machineImage,
BlockDevices = new [] { new BlockDevice {
DeviceName = "gp3-volume",
Volume = BlockDeviceVolume.Ebs(15, new EbsDeviceOptions {
VolumeType = EbsDeviceVolumeType.GP3,
Throughput = 125
})
} }
});
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. |
NoDevice() | Supresses a volume mapping. |
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
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
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
Ephemeral(Double)
Creates a virtual, ephemeral device.
public static BlockDeviceVolume Ephemeral(double volumeIndex)
Parameters
- volumeIndex System.Double
the volume index.
Returns
Remarks
The name will be in the form ephemeral{volumeIndex}.