EbsDeviceProps

class aws_cdk.aws_autoscaling.EbsDeviceProps(*, delete_on_termination=None, iops=None, volume_type=None, volume_size=None, snapshot_id=None)

Bases: EbsDeviceSnapshotOptions

Properties of an EBS block device.

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 for {@link volumeType}: {@link 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 {@link EbsDeviceVolumeType.IO1}

  • volume_type (Optional[EbsDeviceVolumeType]) – The EBS volume type. Default: {@link EbsDeviceVolumeType.GP2}

  • volume_size (Union[int, float, None]) – The volume size, in Gibibytes (GiB). If you specify volumeSize, it must be equal or greater than the size of the snapshot. Default: - The snapshot size

  • snapshot_id (Optional[str]) – The snapshot ID of the volume to use. Default: - No snapshot will be used

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

ebs_device_props = autoscaling.EbsDeviceProps(
    delete_on_termination=False,
    iops=123,
    snapshot_id="snapshotId",
    volume_size=123,
    volume_type=autoscaling.EbsDeviceVolumeType.STANDARD
)

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)

iops

The number of I/O operations per second (IOPS) to provision for the volume.

Must only be set for {@link volumeType}: {@link 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 {@link EbsDeviceVolumeType.IO1}

See:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html

snapshot_id

The snapshot ID of the volume to use.

Default:
  • No snapshot will be used

volume_size

The volume size, in Gibibytes (GiB).

If you specify volumeSize, it must be equal or greater than the size of the snapshot.

Default:
  • The snapshot size

volume_type

The EBS volume type.

Default:

{@link EbsDeviceVolumeType.GP2}

See:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html