# EbsDeviceVolumeType

Supported EBS volume types for blockDevices.

- Source: [`aws-ec2/lib/volume.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ec2/lib/volume.ts#L222)

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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
        })
    } }
});
```

Golang:

```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`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.EbsDeviceOptionsBase.html).volumeType
- [`EbsOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticsearch.EbsOptions.html).volumeType
- [`EbsOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.EbsOptions.html).volumeType
- [`ServiceManagedEBSVolumeConfiguration`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ServiceManagedEBSVolumeConfiguration.html).volumeType
- [`VolumeProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VolumeProps.html).volumeType
