BlockDeviceVolume¶
-
class
aws_cdk.aws_autoscaling.
BlockDeviceVolume
(ebs_device=None, virtual_name=None)¶ Bases:
object
Describes a block device mapping for an EC2 instance or Auto Scaling group.
- Parameters
ebs_device (
Optional
[EbsDeviceProps
]) – EBS device info.virtual_name (
Optional
[str
]) – Virtual device name.
Attributes
-
ebs_device
¶ EBS device info.
- Return type
Optional
[EbsDeviceProps
]
-
virtual_name
¶ Virtual device 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).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: falsedelete_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}
- Return type
-
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.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 sizedelete_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}
- Return type
-
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
-
classmethod
no_device
()¶ Supresses a volume mapping.
- Return type