Interface IEbsDeviceOptions
Block device options for an EBS volume.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IEbsDeviceOptions : IEbsDeviceOptionsBase
Syntax (vb)
Public Interface IEbsDeviceOptions
Inherits IEbsDeviceOptionsBase
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(100, new EbsDeviceOptions {
VolumeType = EbsDeviceVolumeType.GP3,
Throughput = 250
})
} }
});
Synopsis
Properties
Encrypted | Specifies whether the EBS volume is encrypted. |
KmsKey | The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption. |
Properties
Encrypted
Specifies whether the EBS volume is encrypted.
virtual Nullable<bool> Encrypted { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryption
Default: false
KmsKey
The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption.
virtual IKey KmsKey { get; }
Property Value
Remarks
You have to ensure that the KMS CMK has the correct permissions to be used by the service launching the ec2 instances.
Default: - If encrypted is true, the default aws/ebs KMS key will be used.
See: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#ebs-encryption-requirements