Skip to content

BlockDeviceMapping

Source code in docs_src/capo_auto_scaling/types/block_device_mapping.py
class BlockDeviceMapping(TypedDict, closed=True):
    virtual_name: NotRequired[
        "capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
    ]
    """<p>The name of the instance store volume (virtual device) to attach to an instance at launch. The name must be in the form ephemeral<i>X</i> where <i>X</i> is a number starting from zero (0), for example, <code>ephemeral0</code>.</p>"""
    device_name: NotRequired[
        "capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
    ]
    """<p>The device name assigned to the volume (for example, <code>/dev/sdh</code> or <code>xvdh</code>). For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html">Device naming on Linux instances</a> in the <i>Amazon EC2 User Guide</i>.</p> <note> <p>To define a block device mapping, set the device name and exactly one of the following properties: <code>Ebs</code>, <code>NoDevice</code>, or <code>VirtualName</code>.</p> </note>"""
    ebs: NotRequired["capo_auto_scaling.types.ebs.Ebs"]
    """<p>Information to attach an EBS volume to an instance at launch.</p>"""
    no_device: NotRequired["capo_auto_scaling.types.no_device.NoDevice"]
    """<p>Setting this value to <code>true</code> prevents a volume that is included in the block device mapping of the AMI from being mapped to the specified device name at launch.</p> <p>If <code>NoDevice</code> is <code>true</code> for the root device, instances might fail the EC2 health check. In that case, Amazon EC2 Auto Scaling launches replacement instances.</p>"""

device_name instance-attribute

device_name: NotRequired[XmlStringMaxLen255]

The device name assigned to the volume (for example, /dev/sdh or xvdh). For more information, see Device naming on Linux instances in the Amazon EC2 User Guide.

To define a block device mapping, set the device name and exactly one of the following properties: Ebs, NoDevice, or VirtualName.

ebs instance-attribute

ebs: NotRequired[Ebs]

Information to attach an EBS volume to an instance at launch.

no_device instance-attribute

no_device: NotRequired[NoDevice]

Setting this value to true prevents a volume that is included in the block device mapping of the AMI from being mapped to the specified device name at launch.

If NoDevice is true for the root device, instances might fail the EC2 health check. In that case, Amazon EC2 Auto Scaling launches replacement instances.

virtual_name instance-attribute

virtual_name: NotRequired[XmlStringMaxLen255]

The name of the instance store volume (virtual device) to attach to an instance at launch. The name must be in the form ephemeralX where X is a number starting from zero (0), for example, ephemeral0.