EbsDeviceVolumeType Enum
Supported EBS volume types for blockDevices.
| Source | aws-ec2/lib/volume.ts |
|---|
Example
ts
const imageRecipe = new imagebuilder.ImageRecipe(this, 'BlockDeviceImageRecipe', {
baseImage: imagebuilder.BaseImage.fromSsmParameterName(
'/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
),
blockDevices: [
{
deviceName: '/dev/sda1',
volume: ec2.BlockDeviceVolume.ebs(100, {
encrypted: true,
volumeType: ec2.EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3
})
}
]
});
python
image_recipe = imagebuilder.ImageRecipe(self, "BlockDeviceImageRecipe",
base_image=imagebuilder.BaseImage.from_ssm_parameter_name("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"),
block_devices=[ec2.BlockDevice(
device_name="/dev/sda1",
volume=ec2.BlockDeviceVolume.ebs(100,
encrypted=True,
volume_type=ec2.EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3
)
)
]
)
java
ImageRecipe imageRecipe = ImageRecipe.Builder.create(this, "BlockDeviceImageRecipe")
.baseImage(BaseImage.fromSsmParameterName("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"))
.blockDevices(List.of(BlockDevice.builder()
.deviceName("/dev/sda1")
.volume(BlockDeviceVolume.ebs(100, EbsDeviceOptions.builder()
.encrypted(true)
.volumeType(EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3)
.build()))
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
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
})
} }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
imageRecipe := imagebuilder.NewImageRecipe(this, jsii.String("BlockDeviceImageRecipe"), &ImageRecipeProps{
BaseImage: imagebuilder.BaseImage_*FromSsmParameterName(jsii.String("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64")),
BlockDevices: []BlockDevice{
&BlockDevice{
DeviceName: jsii.String("/dev/sda1"),
Volume: ec2.BlockDeviceVolume_Ebs(jsii.Number(100), &EbsDeviceOptions{
Encrypted: jsii.Boolean(true),
VolumeType: ec2.EbsDeviceVolumeType_GENERAL_PURPOSE_SSD_GP3,
}),
},
},
})
Members
| Member | Description |
|---|---|
STANDARD | Magnetic. |
IO1 | Provisioned IOPS SSD - IO1. |
IO2 | Provisioned IOPS SSD - IO2. |
GP2 | General Purpose SSD - GP2. |
GP3 | General Purpose SSD - GP3. |
ST1 | Throughput Optimized HDD. |
SC1 | Cold HDD. |
Referenced by
EbsDeviceOptionsBase.volumeTypevolume_typevolumeTypeVolumeTypeVolumeTypeEbsOptions.volumeTypevolume_typevolumeTypeVolumeTypeVolumeTypeEbsOptions.volumeTypevolume_typevolumeTypeVolumeTypeVolumeTypeServiceManagedEBSVolumeConfiguration.volumeTypevolume_typevolumeTypeVolumeTypeVolumeTypeVolumeProps.volumeTypevolume_typevolumeTypeVolumeTypeVolumeType