# EbsBlockDeviceProperty

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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 ebsBlockDeviceProperty: opsworks.CfnInstance.EbsBlockDeviceProperty = {
  deleteOnTermination: false,
  iops: 123,
  snapshotId: 'snapshotId',
  volumeSize: 123,
  volumeType: 'volumeType',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_opsworks as opsworks

ebs_block_device_property = opsworks.CfnInstance.EbsBlockDeviceProperty(
    delete_on_termination=False,
    iops=123,
    snapshot_id="snapshotId",
    volume_size=123,
    volume_type="volumeType"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.opsworks.*;

EbsBlockDeviceProperty ebsBlockDeviceProperty = EbsBlockDeviceProperty.builder()
        .deleteOnTermination(false)
        .iops(123)
        .snapshotId("snapshotId")
        .volumeSize(123)
        .volumeType("volumeType")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.OpsWorks;

var ebsBlockDeviceProperty = new EbsBlockDeviceProperty {
    DeleteOnTermination = false,
    Iops = 123,
    SnapshotId = "snapshotId",
    VolumeSize = 123,
    VolumeType = "volumeType"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

ebsBlockDeviceProperty := &EbsBlockDeviceProperty{
	DeleteOnTermination: jsii.Boolean(false),
	Iops: jsii.Number(123),
	SnapshotId: jsii.String("snapshotId"),
	VolumeSize: jsii.Number(123),
	VolumeType: jsii.String("volumeType"),
}
```

## Properties

- `deleteOnTermination`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether the volume is deleted on instance termination.

- `iops`: number — The number of I/O operations per second (IOPS) that the volume supports.

  For more information, see [EbsBlockDevice](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html) .

- `snapshotId`: string — The snapshot ID.

- `volumeSize`: number — The volume size, in GiB.

  For more information, see [EbsBlockDevice](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html) .

- `volumeType`: string — The volume type.

  `gp2` for General Purpose (SSD) volumes, `io1` for Provisioned IOPS (SSD) volumes, `st1` for Throughput Optimized hard disk drives (HDD), `sc1` for Cold HDD,and `standard` for Magnetic volumes.

  If you specify the `io1` volume type, you must also specify a value for the `Iops` attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. AWS uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).
