/** * 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 an EBS volume for a Scheduled Instance.

See Also:

* AWS * API Reference

*/ class AWS_EC2_API ScheduledInstancesEbs { public: ScheduledInstancesEbs(); ScheduledInstancesEbs(const Aws::Utils::Xml::XmlNode& xmlNode); ScheduledInstancesEbs& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 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 ScheduledInstancesEbs& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;} /** *

Indicates whether the volume is encrypted. You can attached encrypted volumes * only to instances that support them.

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

Indicates whether the volume is encrypted. You can attached encrypted volumes * only to instances that support them.

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

Indicates whether the volume is encrypted. You can attached encrypted volumes * only to instances that support them.

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

Indicates whether the volume is encrypted. You can attached encrypted volumes * only to instances that support them.

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

The number of I/O operations per second (IOPS) to provision for an * io1 or io2 volume, with a maximum ratio of 50 IOPS/GiB * for io1, and 500 IOPS/GiB for io2. Range is 100 to * 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed * only on Nitro-based * instances. Other instance families guarantee performance up to 32,000 IOPS. * For more information, see Amazon * EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

*

This parameter is valid only for Provisioned IOPS SSD (io1 and * io2) volumes.

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

The number of I/O operations per second (IOPS) to provision for an * io1 or io2 volume, with a maximum ratio of 50 IOPS/GiB * for io1, and 500 IOPS/GiB for io2. Range is 100 to * 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed * only on Nitro-based * instances. Other instance families guarantee performance up to 32,000 IOPS. * For more information, see Amazon * EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

*

This parameter is valid only for Provisioned IOPS SSD (io1 and * io2) volumes.

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

The number of I/O operations per second (IOPS) to provision for an * io1 or io2 volume, with a maximum ratio of 50 IOPS/GiB * for io1, and 500 IOPS/GiB for io2. Range is 100 to * 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed * only on Nitro-based * instances. Other instance families guarantee performance up to 32,000 IOPS. * For more information, see Amazon * EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

*

This parameter is valid only for Provisioned IOPS SSD (io1 and * io2) volumes.

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

The number of I/O operations per second (IOPS) to provision for an * io1 or io2 volume, with a maximum ratio of 50 IOPS/GiB * for io1, and 500 IOPS/GiB for io2. Range is 100 to * 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed * only on Nitro-based * instances. Other instance families guarantee performance up to 32,000 IOPS. * For more information, see Amazon * EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

*

This parameter is valid only for Provisioned IOPS SSD (io1 and * io2) volumes.

*/ inline ScheduledInstancesEbs& WithIops(int value) { SetIops(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 ScheduledInstancesEbs& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;} /** *

The ID of the snapshot.

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

The ID of the snapshot.

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

The size of the volume, in GiB.

Default: If you're creating the volume * from a snapshot and don't specify a volume size, the default is the snapshot * size.

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

The size of the volume, in GiB.

Default: If you're creating the volume * from a snapshot and don't specify a volume size, the default is the snapshot * size.

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

The size of the volume, in GiB.

Default: If you're creating the volume * from a snapshot and don't specify a volume size, the default is the snapshot * size.

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

The size of the volume, in GiB.

Default: If you're creating the volume * from a snapshot and don't specify a volume size, the default is the snapshot * size.

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

The volume type. gp2 for General Purpose SSD, io1 * or io2 for Provisioned IOPS SSD, Throughput Optimized HDD for * st1, Cold HDD for sc1, or standard for * Magnetic.

Default: gp2

*/ inline const Aws::String& GetVolumeType() const{ return m_volumeType; } /** *

The volume type. gp2 for General Purpose SSD, io1 * or io2 for Provisioned IOPS SSD, Throughput Optimized HDD for * st1, Cold HDD for sc1, or standard for * Magnetic.

Default: gp2

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

The volume type. gp2 for General Purpose SSD, io1 * or io2 for Provisioned IOPS SSD, Throughput Optimized HDD for * st1, Cold HDD for sc1, or standard for * Magnetic.

Default: gp2

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

The volume type. gp2 for General Purpose SSD, io1 * or io2 for Provisioned IOPS SSD, Throughput Optimized HDD for * st1, Cold HDD for sc1, or standard for * Magnetic.

Default: gp2

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

The volume type. gp2 for General Purpose SSD, io1 * or io2 for Provisioned IOPS SSD, Throughput Optimized HDD for * st1, Cold HDD for sc1, or standard for * Magnetic.

Default: gp2

*/ inline void SetVolumeType(const char* value) { m_volumeTypeHasBeenSet = true; m_volumeType.assign(value); } /** *

The volume type. gp2 for General Purpose SSD, io1 * or io2 for Provisioned IOPS SSD, Throughput Optimized HDD for * st1, Cold HDD for sc1, or standard for * Magnetic.

Default: gp2

*/ inline ScheduledInstancesEbs& WithVolumeType(const Aws::String& value) { SetVolumeType(value); return *this;} /** *

The volume type. gp2 for General Purpose SSD, io1 * or io2 for Provisioned IOPS SSD, Throughput Optimized HDD for * st1, Cold HDD for sc1, or standard for * Magnetic.

Default: gp2

*/ inline ScheduledInstancesEbs& WithVolumeType(Aws::String&& value) { SetVolumeType(std::move(value)); return *this;} /** *

The volume type. gp2 for General Purpose SSD, io1 * or io2 for Provisioned IOPS SSD, Throughput Optimized HDD for * st1, Cold HDD for sc1, or standard for * Magnetic.

Default: gp2

*/ inline ScheduledInstancesEbs& WithVolumeType(const char* value) { SetVolumeType(value); return *this;} private: bool m_deleteOnTermination; bool m_deleteOnTerminationHasBeenSet; bool m_encrypted; bool m_encryptedHasBeenSet; int m_iops; bool m_iopsHasBeenSet; Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet; int m_volumeSize; bool m_volumeSizeHasBeenSet; Aws::String m_volumeType; bool m_volumeTypeHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws