EbsDeviceOptions
- class aws_cdk.aws_autoscaling.EbsDeviceOptions(*, delete_on_termination=None, iops=None, throughput=None, volume_type=None, encrypted=None)
Bases:
EbsDeviceOptionsBase
Block device options for an EBS volume.
- Parameters:
delete_on_termination (
Optional
[bool
]) – Indicates whether to delete the volume when the instance is terminated. Default: - true for Amazon EC2 Auto Scaling, false otherwise (e.g. EBS)iops (
Union
[int
,float
,None
]) – The number of I/O operations per second (IOPS) to provision for the volume. Must only be set forvolumeType
: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. Default: - none, required forEbsDeviceVolumeType.IO1
throughput (
Union
[int
,float
,None
]) – The throughput that the volume supports, in MiB/s Takes a minimum of 125 and maximum of 1000. Default: - 125 MiB/s. Only valid on gp3 volumes.volume_type (
Optional
[EbsDeviceVolumeType
]) – The EBS volume type. Default:EbsDeviceVolumeType.GP2
encrypted (
Optional
[bool
]) – Specifies whether the EBS volume is encrypted. Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryption Default: false
- ExampleMetadata:
infused
Example:
# vpc: ec2.Vpc # instance_type: ec2.InstanceType # machine_image: ec2.IMachineImage auto_scaling_group = autoscaling.AutoScalingGroup(self, "ASG", vpc=vpc, instance_type=instance_type, machine_image=machine_image, block_devices=[autoscaling.BlockDevice( device_name="gp3-volume", volume=autoscaling.BlockDeviceVolume.ebs(15, volume_type=autoscaling.EbsDeviceVolumeType.GP3, throughput=125 ) ) ] )
Attributes
- delete_on_termination
Indicates whether to delete the volume when the instance is terminated.
- Default:
true for Amazon EC2 Auto Scaling, false otherwise (e.g. EBS)
- encrypted
Specifies whether the EBS volume is encrypted.
Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryption
- iops
The number of I/O operations per second (IOPS) to provision for the volume.
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.
- Default:
none, required for
EbsDeviceVolumeType.IO1
- See:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
- throughput
The throughput that the volume supports, in MiB/s Takes a minimum of 125 and maximum of 1000.
- Default:
125 MiB/s. Only valid on gp3 volumes.
- See:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
- volume_type
The EBS volume type.
- Default:
EbsDeviceVolumeType.GP2
- See:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html