# BlockDeviceMappingProperty

- Source: Generated code
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opsworks as opsworks } from 'aws-cdk-lib';
const blockDeviceMappingProperty: opsworks.CfnInstance.BlockDeviceMappingProperty = {
  deviceName: 'deviceName',
  ebs: {
    deleteOnTermination: false,
    iops: 123,
    snapshotId: 'snapshotId',
    volumeSize: 123,
    volumeType: 'volumeType',
  },
  noDevice: 'noDevice',
  virtualName: 'virtualName',
};
```

## Properties

- `deviceName`: string — The device name that is exposed to the instance, such as `/dev/sdh` .

  For the root device, you can use the explicit device name or you can set this parameter to `ROOT_DEVICE` and OpsWorks Stacks will provide the correct device name.

- `ebs`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInstance.EbsBlockDeviceProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_opsworks.CfnInstance.EbsBlockDeviceProperty.html) — An `EBSBlockDevice` that defines how to configure an Amazon EBS volume when the instance is launched.

  You can specify either the `VirtualName` or `Ebs` , but not both.

- `noDevice`: string — Suppresses the specified device included in the AMI's block device mapping.

- `virtualName`: string — The virtual device name.

  For more information, see [BlockDeviceMapping](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html) . You can specify either the `VirtualName` or `Ebs` , but not both.
