Show / Hide Table of Contents

Interface IEbsDeviceOptions

Block device options for an EBS volume.

Inherited Members
IEbsDeviceOptionsBase.DeleteOnTermination
IEbsDeviceOptionsBase.Iops
IEbsDeviceOptionsBase.Throughput
IEbsDeviceOptionsBase.VolumeType
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
var imageRecipe = new ImageRecipe(this, "BlockDeviceImageRecipe", new ImageRecipeProps {
                BaseImage = BaseImage.FromSsmParameterName("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"),
                BlockDevices = new [] { new BlockDevice {
                    DeviceName = "/dev/sda1",
                    Volume = BlockDeviceVolume.Ebs(100, new EbsDeviceOptions {
                        Encrypted = true,
                        VolumeType = EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3
                    })
                } }
            });

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.

bool? Encrypted { get; }
Property Value

bool?

Remarks

Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryption

Default: false

See: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances

KmsKey

The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption.

IKey? KmsKey { get; }
Property Value

IKey

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

Back to top Generated by DocFX