Skip to content
v2.278.0

EbsDeviceOptionsBase Struct ​

Base block device options for an EBS volume.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';

declare const size: cdk.Size;
const ebsDeviceOptionsBase: ec2.EbsDeviceOptionsBase = {
  deleteOnTermination: false,
  iops: 123,
  throughput: 123,
  volumeInitializationRate: size,
  volumeType: ec2.EbsDeviceVolumeType.STANDARD,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_ec2 as ec2

# size: cdk.Size

ebs_device_options_base = ec2.EbsDeviceOptionsBase(
    delete_on_termination=False,
    iops=123,
    throughput=123,
    volume_initialization_rate=size,
    volume_type=ec2.EbsDeviceVolumeType.STANDARD
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ec2.*;

Size size;

EbsDeviceOptionsBase ebsDeviceOptionsBase = EbsDeviceOptionsBase.builder()
        .deleteOnTermination(false)
        .iops(123)
        .throughput(123)
        .volumeInitializationRate(size)
        .volumeType(EbsDeviceVolumeType.STANDARD)
        .build();
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;
using Amazon.CDK.AWS.EC2;

Size size;

var ebsDeviceOptionsBase = new EbsDeviceOptionsBase {
    DeleteOnTermination = false,
    Iops = 123,
    Throughput = 123,
    VolumeInitializationRate = size,
    VolumeType = EbsDeviceVolumeType.STANDARD
};
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 cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var size Size

ebsDeviceOptionsBase := &EbsDeviceOptionsBase{
	DeleteOnTermination: jsii.Boolean(false),
	Iops: jsii.Number(123),
	Throughput: jsii.Number(123),
	VolumeInitializationRate: size,
	VolumeType: awscdk.Aws_ec2.EbsDeviceVolumeType_STANDARD,
}

Properties ​

deleteOnTerminationoptionalbooleandelete_on_terminationoptionalbooldeleteOnTerminationoptionalBooleanDeleteOnTerminationoptionalboolDeleteOnTerminationoptional*bool #
Indicates whether to delete the volume when the instance is terminated.

Default: true for Amazon EC2 Auto Scaling, false otherwise (e.g. EBS)

iopsoptionalnumberiopsoptionalint | floatiopsoptionalNumberIopsoptionaldoubleIopsoptional*float64 #
The number of I/O operations per second (IOPS) to provision for the volume.

Default: none, required for EbsDeviceVolumeType.IO1

Must only be set for volumeType: EbsDeviceVolumeType.IO1

The maximum ratio of IOPS to volume size (in GiB) is 50:1, so for 5,000 provisioned IOPS, you need at least 100 GiB storage on the volume.

throughputoptionalnumberthroughputoptionalint | floatthroughputoptionalNumberThroughputoptionaldoubleThroughputoptional*float64 #
The throughput to provision for a `gp3` volume.

Default: 125 MiB/s.

notes

Valid Range: Minimum value of 125. Maximum value of 2000.

gp3 volumes deliver a consistent baseline throughput performance of 125 MiB/s. You can provision additional throughput for an additional cost at a ratio of 0.25 MiB/s per provisioned IOPS.

volumeInitializationRateoptionalSizevolume_initialization_rateoptionalSizevolumeInitializationRateoptionalSizeVolumeInitializationRateoptionalSizeVolumeInitializationRateoptionalSize #
The Amazon EBS Provisioned Rate for Volume Initialization, at which to download the snapshot blocks from Amazon S3 to the volume.

Default: undefined - The volume initialization rate is not set.

Valid range is between 100 and 300 MiB/s. This parameter is supported only for volumes created from snapshots.

volumeTypeoptionalEbsDeviceVolumeTypevolume_typeoptionalEbsDeviceVolumeTypevolumeTypeoptionalEbsDeviceVolumeTypeVolumeTypeoptionalEbsDeviceVolumeTypeVolumeTypeoptionalEbsDeviceVolumeType #
The EBS volume type.

Default: EbsDeviceVolumeType.GENERAL_PURPOSE_SSD or EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3 if @aws-cdk/aws-ec2:ebsDefaultGp3Volume is enabled.