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

Describes a block device for an EBS volume.

See Also:

AWS * API Reference

*/ class LaunchTemplateEbsBlockDevice { public: AWS_EC2_API LaunchTemplateEbsBlockDevice(); AWS_EC2_API LaunchTemplateEbsBlockDevice(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API LaunchTemplateEbsBlockDevice& 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 EBS volume is encrypted.

*/ inline bool GetEncrypted() const{ return m_encrypted; } /** *

Indicates whether the EBS volume is encrypted.

*/ inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; } /** *

Indicates whether the EBS volume is encrypted.

*/ inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; } /** *

Indicates whether the EBS volume is encrypted.

*/ inline LaunchTemplateEbsBlockDevice& WithEncrypted(bool value) { SetEncrypted(value); return *this;} /** *

Indicates whether the EBS volume is deleted on instance termination.

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

Indicates whether the EBS volume is deleted on instance termination.

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

Indicates whether the EBS volume is deleted on instance termination.

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

Indicates whether the EBS volume is deleted on instance termination.

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

The number of I/O operations per second (IOPS) that the volume supports.

*/ inline int GetIops() const{ return m_iops; } /** *

The number of I/O operations per second (IOPS) that the volume supports.

*/ inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; } /** *

The number of I/O operations per second (IOPS) that the volume supports.

*/ inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; } /** *

The number of I/O operations per second (IOPS) that the volume supports.

*/ inline LaunchTemplateEbsBlockDevice& WithIops(int value) { SetIops(value); return *this;} /** *

The ARN of the Key Management Service (KMS) CMK used for encryption.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

The ARN of the Key Management Service (KMS) CMK used for encryption.

*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

The ARN of the Key Management Service (KMS) CMK used for encryption.

*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** *

The ARN of the Key Management Service (KMS) CMK used for encryption.

*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** *

The ARN of the Key Management Service (KMS) CMK used for encryption.

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** *

The ARN of the Key Management Service (KMS) CMK used for encryption.

*/ inline LaunchTemplateEbsBlockDevice& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

The ARN of the Key Management Service (KMS) CMK used for encryption.

*/ inline LaunchTemplateEbsBlockDevice& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

The ARN of the Key Management Service (KMS) CMK used for encryption.

*/ inline LaunchTemplateEbsBlockDevice& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** *

The ID of the snapshot.

*/ inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; } /** *

The ID of the snapshot.

*/ inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; } /** *

The ID of the snapshot.

*/ inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; } /** *

The ID of the snapshot.

*/ inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::move(value); } /** *

The ID of the snapshot.

*/ inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); } /** *

The ID of the snapshot.

*/ inline LaunchTemplateEbsBlockDevice& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;} /** *

The ID of the snapshot.

*/ inline LaunchTemplateEbsBlockDevice& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;} /** *

The ID of the snapshot.

*/ inline LaunchTemplateEbsBlockDevice& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;} /** *

The size of the volume, in GiB.

*/ inline int GetVolumeSize() const{ return m_volumeSize; } /** *

The size of the volume, in GiB.

*/ inline bool VolumeSizeHasBeenSet() const { return m_volumeSizeHasBeenSet; } /** *

The size of the volume, in GiB.

*/ inline void SetVolumeSize(int value) { m_volumeSizeHasBeenSet = true; m_volumeSize = value; } /** *

The size of the volume, in GiB.

*/ inline LaunchTemplateEbsBlockDevice& WithVolumeSize(int value) { SetVolumeSize(value); return *this;} /** *

The volume type.

*/ inline const VolumeType& GetVolumeType() const{ return m_volumeType; } /** *

The volume type.

*/ inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; } /** *

The volume type.

*/ inline void SetVolumeType(const VolumeType& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; } /** *

The volume type.

*/ inline void SetVolumeType(VolumeType&& value) { m_volumeTypeHasBeenSet = true; m_volumeType = std::move(value); } /** *

The volume type.

*/ inline LaunchTemplateEbsBlockDevice& WithVolumeType(const VolumeType& value) { SetVolumeType(value); return *this;} /** *

The volume type.

*/ inline LaunchTemplateEbsBlockDevice& WithVolumeType(VolumeType&& value) { SetVolumeType(std::move(value)); return *this;} /** *

The throughput that the volume supports, in MiB/s.

*/ inline int GetThroughput() const{ return m_throughput; } /** *

The throughput that the volume supports, in MiB/s.

*/ inline bool ThroughputHasBeenSet() const { return m_throughputHasBeenSet; } /** *

The throughput that the volume supports, in MiB/s.

*/ inline void SetThroughput(int value) { m_throughputHasBeenSet = true; m_throughput = value; } /** *

The throughput that the volume supports, in MiB/s.

*/ inline LaunchTemplateEbsBlockDevice& WithThroughput(int value) { SetThroughput(value); return *this;} private: bool m_encrypted; bool m_encryptedHasBeenSet = false; bool m_deleteOnTermination; bool m_deleteOnTerminationHasBeenSet = false; int m_iops; bool m_iopsHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet = false; int m_volumeSize; bool m_volumeSizeHasBeenSet = false; VolumeType m_volumeType; bool m_volumeTypeHasBeenSet = false; int m_throughput; bool m_throughputHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws