BlockDeviceVolume

class aws_cdk.aws_autoscaling.BlockDeviceVolume(ebs_device=None, virtual_name=None)

Bases: object

Describes a block device mapping for an Auto Scaling group.

__init__(ebs_device=None, virtual_name=None)
Parameters
  • ebs_device (Optional[EbsDeviceProps]) –

  • virtual_name (Optional[str]) –

Return type

None

Attributes

ebs_device
Return type

Optional[EbsDeviceProps]

virtual_name
Return type

Optional[str]

Static Methods

classmethod ebs(volume_size, *, encrypted=None, delete_on_termination=None, iops=None, volume_type=None)

Creates a new Elastic Block Storage device.

Parameters
  • volume_size (Union[int, float]) – The volume size, in Gibibytes (GiB).

  • options – additional device options.

  • 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

  • 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.

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

Return type

BlockDeviceVolume

classmethod ebs_from_snapshot(snapshot_id, *, volume_size=None, delete_on_termination=None, iops=None, volume_type=None)

Creates a new Elastic Block Storage device from an existing snapshot.

Parameters
  • snapshot_id (str) – The snapshot ID of the volume to use.

  • options – additional device options.

  • 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

  • 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.

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

Return type

BlockDeviceVolume

classmethod ephemeral(volume_index)

Creates a virtual, ephemeral device. The name will be in the form ephemeral{volumeIndex}.

Parameters

volume_index (Union[int, float]) – the volume index. Must be equal or greater than 0

Return type

BlockDeviceVolume