/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Describes a block device mapping, which defines the EBS volumes and instance
* store volumes to attach to an instance at launch.See Also:
AWS
* API Reference
The device name (for example, /dev/sdh
or
* xvdh
).
The device name (for example, /dev/sdh
or
* xvdh
).
The device name (for example, /dev/sdh
or
* xvdh
).
The device name (for example, /dev/sdh
or
* xvdh
).
The device name (for example, /dev/sdh
or
* xvdh
).
The device name (for example, /dev/sdh
or
* xvdh
).
The device name (for example, /dev/sdh
or
* xvdh
).
The device name (for example, /dev/sdh
or
* xvdh
).
The virtual device name (ephemeral
N). Instance store volumes are
* numbered starting from 0. An instance type with 2 available instance store
* volumes can specify mappings for ephemeral0
and
* ephemeral1
. The number of available instance store volumes depends
* on the instance type. After you connect to the instance, you must mount the
* volume.
NVMe instance store volumes are automatically enumerated and * assigned a device name. Including them in your block device mapping has no * effect.
Constraints: For M3 instances, you must specify instance store * volumes in the block device mapping for the instance. When you launch an M3 * instance, we ignore any instance store volumes specified in the block device * mapping for the AMI.
*/ inline const Aws::String& GetVirtualName() const{ return m_virtualName; } /** *The virtual device name (ephemeral
N). Instance store volumes are
* numbered starting from 0. An instance type with 2 available instance store
* volumes can specify mappings for ephemeral0
and
* ephemeral1
. The number of available instance store volumes depends
* on the instance type. After you connect to the instance, you must mount the
* volume.
NVMe instance store volumes are automatically enumerated and * assigned a device name. Including them in your block device mapping has no * effect.
Constraints: For M3 instances, you must specify instance store * volumes in the block device mapping for the instance. When you launch an M3 * instance, we ignore any instance store volumes specified in the block device * mapping for the AMI.
*/ inline bool VirtualNameHasBeenSet() const { return m_virtualNameHasBeenSet; } /** *The virtual device name (ephemeral
N). Instance store volumes are
* numbered starting from 0. An instance type with 2 available instance store
* volumes can specify mappings for ephemeral0
and
* ephemeral1
. The number of available instance store volumes depends
* on the instance type. After you connect to the instance, you must mount the
* volume.
NVMe instance store volumes are automatically enumerated and * assigned a device name. Including them in your block device mapping has no * effect.
Constraints: For M3 instances, you must specify instance store * volumes in the block device mapping for the instance. When you launch an M3 * instance, we ignore any instance store volumes specified in the block device * mapping for the AMI.
*/ inline void SetVirtualName(const Aws::String& value) { m_virtualNameHasBeenSet = true; m_virtualName = value; } /** *The virtual device name (ephemeral
N). Instance store volumes are
* numbered starting from 0. An instance type with 2 available instance store
* volumes can specify mappings for ephemeral0
and
* ephemeral1
. The number of available instance store volumes depends
* on the instance type. After you connect to the instance, you must mount the
* volume.
NVMe instance store volumes are automatically enumerated and * assigned a device name. Including them in your block device mapping has no * effect.
Constraints: For M3 instances, you must specify instance store * volumes in the block device mapping for the instance. When you launch an M3 * instance, we ignore any instance store volumes specified in the block device * mapping for the AMI.
*/ inline void SetVirtualName(Aws::String&& value) { m_virtualNameHasBeenSet = true; m_virtualName = std::move(value); } /** *The virtual device name (ephemeral
N). Instance store volumes are
* numbered starting from 0. An instance type with 2 available instance store
* volumes can specify mappings for ephemeral0
and
* ephemeral1
. The number of available instance store volumes depends
* on the instance type. After you connect to the instance, you must mount the
* volume.
NVMe instance store volumes are automatically enumerated and * assigned a device name. Including them in your block device mapping has no * effect.
Constraints: For M3 instances, you must specify instance store * volumes in the block device mapping for the instance. When you launch an M3 * instance, we ignore any instance store volumes specified in the block device * mapping for the AMI.
*/ inline void SetVirtualName(const char* value) { m_virtualNameHasBeenSet = true; m_virtualName.assign(value); } /** *The virtual device name (ephemeral
N). Instance store volumes are
* numbered starting from 0. An instance type with 2 available instance store
* volumes can specify mappings for ephemeral0
and
* ephemeral1
. The number of available instance store volumes depends
* on the instance type. After you connect to the instance, you must mount the
* volume.
NVMe instance store volumes are automatically enumerated and * assigned a device name. Including them in your block device mapping has no * effect.
Constraints: For M3 instances, you must specify instance store * volumes in the block device mapping for the instance. When you launch an M3 * instance, we ignore any instance store volumes specified in the block device * mapping for the AMI.
*/ inline BlockDeviceMapping& WithVirtualName(const Aws::String& value) { SetVirtualName(value); return *this;} /** *The virtual device name (ephemeral
N). Instance store volumes are
* numbered starting from 0. An instance type with 2 available instance store
* volumes can specify mappings for ephemeral0
and
* ephemeral1
. The number of available instance store volumes depends
* on the instance type. After you connect to the instance, you must mount the
* volume.
NVMe instance store volumes are automatically enumerated and * assigned a device name. Including them in your block device mapping has no * effect.
Constraints: For M3 instances, you must specify instance store * volumes in the block device mapping for the instance. When you launch an M3 * instance, we ignore any instance store volumes specified in the block device * mapping for the AMI.
*/ inline BlockDeviceMapping& WithVirtualName(Aws::String&& value) { SetVirtualName(std::move(value)); return *this;} /** *The virtual device name (ephemeral
N). Instance store volumes are
* numbered starting from 0. An instance type with 2 available instance store
* volumes can specify mappings for ephemeral0
and
* ephemeral1
. The number of available instance store volumes depends
* on the instance type. After you connect to the instance, you must mount the
* volume.
NVMe instance store volumes are automatically enumerated and * assigned a device name. Including them in your block device mapping has no * effect.
Constraints: For M3 instances, you must specify instance store * volumes in the block device mapping for the instance. When you launch an M3 * instance, we ignore any instance store volumes specified in the block device * mapping for the AMI.
*/ inline BlockDeviceMapping& WithVirtualName(const char* value) { SetVirtualName(value); return *this;} /** *Parameters used to automatically set up EBS volumes when the instance is * launched.
*/ inline const EbsBlockDevice& GetEbs() const{ return m_ebs; } /** *Parameters used to automatically set up EBS volumes when the instance is * launched.
*/ inline bool EbsHasBeenSet() const { return m_ebsHasBeenSet; } /** *Parameters used to automatically set up EBS volumes when the instance is * launched.
*/ inline void SetEbs(const EbsBlockDevice& value) { m_ebsHasBeenSet = true; m_ebs = value; } /** *Parameters used to automatically set up EBS volumes when the instance is * launched.
*/ inline void SetEbs(EbsBlockDevice&& value) { m_ebsHasBeenSet = true; m_ebs = std::move(value); } /** *Parameters used to automatically set up EBS volumes when the instance is * launched.
*/ inline BlockDeviceMapping& WithEbs(const EbsBlockDevice& value) { SetEbs(value); return *this;} /** *Parameters used to automatically set up EBS volumes when the instance is * launched.
*/ inline BlockDeviceMapping& WithEbs(EbsBlockDevice&& value) { SetEbs(std::move(value)); return *this;} /** *To omit the device from the block device mapping, specify an empty string. * When this property is specified, the device is removed from the block device * mapping regardless of the assigned value.
*/ inline const Aws::String& GetNoDevice() const{ return m_noDevice; } /** *To omit the device from the block device mapping, specify an empty string. * When this property is specified, the device is removed from the block device * mapping regardless of the assigned value.
*/ inline bool NoDeviceHasBeenSet() const { return m_noDeviceHasBeenSet; } /** *To omit the device from the block device mapping, specify an empty string. * When this property is specified, the device is removed from the block device * mapping regardless of the assigned value.
*/ inline void SetNoDevice(const Aws::String& value) { m_noDeviceHasBeenSet = true; m_noDevice = value; } /** *To omit the device from the block device mapping, specify an empty string. * When this property is specified, the device is removed from the block device * mapping regardless of the assigned value.
*/ inline void SetNoDevice(Aws::String&& value) { m_noDeviceHasBeenSet = true; m_noDevice = std::move(value); } /** *To omit the device from the block device mapping, specify an empty string. * When this property is specified, the device is removed from the block device * mapping regardless of the assigned value.
*/ inline void SetNoDevice(const char* value) { m_noDeviceHasBeenSet = true; m_noDevice.assign(value); } /** *To omit the device from the block device mapping, specify an empty string. * When this property is specified, the device is removed from the block device * mapping regardless of the assigned value.
*/ inline BlockDeviceMapping& WithNoDevice(const Aws::String& value) { SetNoDevice(value); return *this;} /** *To omit the device from the block device mapping, specify an empty string. * When this property is specified, the device is removed from the block device * mapping regardless of the assigned value.
*/ inline BlockDeviceMapping& WithNoDevice(Aws::String&& value) { SetNoDevice(std::move(value)); return *this;} /** *To omit the device from the block device mapping, specify an empty string. * When this property is specified, the device is removed from the block device * mapping regardless of the assigned value.
*/ inline BlockDeviceMapping& WithNoDevice(const char* value) { SetNoDevice(value); return *this;} private: Aws::String m_deviceName; bool m_deviceNameHasBeenSet = false; Aws::String m_virtualName; bool m_virtualNameHasBeenSet = false; EbsBlockDevice m_ebs; bool m_ebsHasBeenSet = false; Aws::String m_noDevice; bool m_noDeviceHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws