/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes information used to set up an EBS volume specified in a block * device mapping.

See Also:

AWS * API Reference

*/ class EbsInstanceBlockDeviceSpecification { public: AWS_EC2_API EbsInstanceBlockDeviceSpecification(); AWS_EC2_API EbsInstanceBlockDeviceSpecification(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API EbsInstanceBlockDeviceSpecification& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

Indicates whether the volume is deleted on instance termination.

*/ inline bool GetDeleteOnTermination() const{ return m_deleteOnTermination; } /** *

Indicates whether the volume is deleted on instance termination.

*/ inline bool DeleteOnTerminationHasBeenSet() const { return m_deleteOnTerminationHasBeenSet; } /** *

Indicates whether the volume is deleted on instance termination.

*/ inline void SetDeleteOnTermination(bool value) { m_deleteOnTerminationHasBeenSet = true; m_deleteOnTermination = value; } /** *

Indicates whether the volume is deleted on instance termination.

*/ inline EbsInstanceBlockDeviceSpecification& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;} /** *

The ID of the EBS volume.

*/ inline const Aws::String& GetVolumeId() const{ return m_volumeId; } /** *

The ID of the EBS volume.

*/ inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; } /** *

The ID of the EBS volume.

*/ inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; } /** *

The ID of the EBS volume.

*/ inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::move(value); } /** *

The ID of the EBS volume.

*/ inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); } /** *

The ID of the EBS volume.

*/ inline EbsInstanceBlockDeviceSpecification& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;} /** *

The ID of the EBS volume.

*/ inline EbsInstanceBlockDeviceSpecification& WithVolumeId(Aws::String&& value) { SetVolumeId(std::move(value)); return *this;} /** *

The ID of the EBS volume.

*/ inline EbsInstanceBlockDeviceSpecification& WithVolumeId(const char* value) { SetVolumeId(value); return *this;} private: bool m_deleteOnTermination; bool m_deleteOnTerminationHasBeenSet = false; Aws::String m_volumeId; bool m_volumeIdHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws