Amazon EC2 Auto Scaling · JSON Structure

Ec2 Auto Scaling Block Device Mapping Structure

Describes a block device mapping.

Type: object Properties: 4 Required: 1
Amazon Web ServicesAuto ScalingComputeEC2High AvailabilityScaling

BlockDeviceMapping is a JSON Structure definition published by Amazon EC2 Auto Scaling, describing 4 properties, of which 1 is required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

VirtualName DeviceName Ebs NoDevice

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-ec2-auto-scaling/refs/heads/main/json-structure/ec2-auto-scaling-block-device-mapping-structure.json",
  "name": "BlockDeviceMapping",
  "description": "Describes a block device mapping.",
  "type": "object",
  "properties": {
    "VirtualName": {
      "allOf": [
        {
          "$ref": "#/components/schemas/XmlStringMaxLen255"
        },
        {
          "description": "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>."
        }
      ]
    },
    "DeviceName": {
      "allOf": [
        {
          "$ref": "#/components/schemas/XmlStringMaxLen255"
        },
        {
          "description": "<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 for Linux Instances</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": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Ebs"
        },
        {
          "description": "Information to attach an EBS volume to an instance at launch."
        }
      ]
    },
    "NoDevice": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NoDevice"
        },
        {
          "description": "<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>"
        }
      ]
    }
  },
  "required": [
    "DeviceName"
  ]
}