/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace OpsWorks { namespace Model { /** *

Describes an Amazon EBS volume. This data type maps directly to the Amazon * EC2 EbsBlockDevice * data type.

See Also:

AWS * API Reference

*/ class EbsBlockDevice { public: AWS_OPSWORKS_API EbsBlockDevice(); AWS_OPSWORKS_API EbsBlockDevice(Aws::Utils::Json::JsonView jsonValue); AWS_OPSWORKS_API EbsBlockDevice& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_OPSWORKS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The snapshot ID.

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

The snapshot ID.

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

The snapshot ID.

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

The snapshot ID.

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

The snapshot ID.

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

The snapshot ID.

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

The snapshot ID.

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

The snapshot ID.

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

The number of I/O operations per second (IOPS) that the volume supports. For * more information, see EbsBlockDevice.

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

The number of I/O operations per second (IOPS) that the volume supports. For * more information, see EbsBlockDevice.

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

The number of I/O operations per second (IOPS) that the volume supports. For * more information, see EbsBlockDevice.

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

The number of I/O operations per second (IOPS) that the volume supports. For * more information, see EbsBlockDevice.

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

The volume size, in GiB. For more information, see EbsBlockDevice.

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

The volume size, in GiB. For more information, see EbsBlockDevice.

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

The volume size, in GiB. For more information, see EbsBlockDevice.

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

The volume size, in GiB. For more information, see EbsBlockDevice.

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

The volume type. gp2 for General Purpose (SSD) volumes, * io1 for Provisioned IOPS (SSD) volumes, st1 for * Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and * standard for Magnetic volumes.

If you specify the * io1 volume type, you must also specify a value for the * Iops attribute. The maximum ratio of provisioned IOPS to requested * volume size (in GiB) is 50:1. AWS uses the default volume size (in GiB) * specified in the AMI attributes to set IOPS to 50 x (volume size).

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

The volume type. gp2 for General Purpose (SSD) volumes, * io1 for Provisioned IOPS (SSD) volumes, st1 for * Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and * standard for Magnetic volumes.

If you specify the * io1 volume type, you must also specify a value for the * Iops attribute. The maximum ratio of provisioned IOPS to requested * volume size (in GiB) is 50:1. AWS uses the default volume size (in GiB) * specified in the AMI attributes to set IOPS to 50 x (volume size).

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

The volume type. gp2 for General Purpose (SSD) volumes, * io1 for Provisioned IOPS (SSD) volumes, st1 for * Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and * standard for Magnetic volumes.

If you specify the * io1 volume type, you must also specify a value for the * Iops attribute. The maximum ratio of provisioned IOPS to requested * volume size (in GiB) is 50:1. AWS uses the default volume size (in GiB) * specified in the AMI attributes to set IOPS to 50 x (volume size).

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

The volume type. gp2 for General Purpose (SSD) volumes, * io1 for Provisioned IOPS (SSD) volumes, st1 for * Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and * standard for Magnetic volumes.

If you specify the * io1 volume type, you must also specify a value for the * Iops attribute. The maximum ratio of provisioned IOPS to requested * volume size (in GiB) is 50:1. AWS uses the default volume size (in GiB) * specified in the AMI attributes to set IOPS to 50 x (volume size).

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

The volume type. gp2 for General Purpose (SSD) volumes, * io1 for Provisioned IOPS (SSD) volumes, st1 for * Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and * standard for Magnetic volumes.

If you specify the * io1 volume type, you must also specify a value for the * Iops attribute. The maximum ratio of provisioned IOPS to requested * volume size (in GiB) is 50:1. AWS uses the default volume size (in GiB) * specified in the AMI attributes to set IOPS to 50 x (volume size).

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

The volume type. gp2 for General Purpose (SSD) volumes, * io1 for Provisioned IOPS (SSD) volumes, st1 for * Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and * standard for Magnetic volumes.

If you specify the * io1 volume type, you must also specify a value for the * Iops attribute. The maximum ratio of provisioned IOPS to requested * volume size (in GiB) is 50:1. AWS uses the default volume size (in GiB) * specified in the AMI attributes to set IOPS to 50 x (volume size).

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

Whether the volume is deleted on instance termination.

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

Whether the volume is deleted on instance termination.

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

Whether the volume is deleted on instance termination.

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

Whether the volume is deleted on instance termination.

*/ inline EbsBlockDevice& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;} private: Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet = false; int m_iops; bool m_iopsHasBeenSet = false; int m_volumeSize; bool m_volumeSizeHasBeenSet = false; VolumeType m_volumeType; bool m_volumeTypeHasBeenSet = false; bool m_deleteOnTermination; bool m_deleteOnTerminationHasBeenSet = false; }; } // namespace Model } // namespace OpsWorks } // namespace Aws