/** * 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 AutoScaling { namespace Model { /** *

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

See Also:

AWS API * Reference

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

The snapshot ID of the volume to use.

You must specify either a * VolumeSize or a SnapshotId.

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

The snapshot ID of the volume to use.

You must specify either a * VolumeSize or a SnapshotId.

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

The snapshot ID of the volume to use.

You must specify either a * VolumeSize or a SnapshotId.

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

The snapshot ID of the volume to use.

You must specify either a * VolumeSize or a SnapshotId.

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

The snapshot ID of the volume to use.

You must specify either a * VolumeSize or a SnapshotId.

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

The snapshot ID of the volume to use.

You must specify either a * VolumeSize or a SnapshotId.

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

The snapshot ID of the volume to use.

You must specify either a * VolumeSize or a SnapshotId.

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

The snapshot ID of the volume to use.

You must specify either a * VolumeSize or a SnapshotId.

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

The volume size, in GiBs. The following are the supported volumes sizes for * each volume type:

  • gp2 and gp3: * 1-16,384

  • io1: 4-16,384

  • * st1 and sc1: 125-16,384

  • * standard: 1-1,024

You must specify either a * SnapshotId or a VolumeSize. If you specify both * SnapshotId and VolumeSize, the volume size must be * equal or greater than the size of the snapshot.

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

The volume size, in GiBs. The following are the supported volumes sizes for * each volume type:

  • gp2 and gp3: * 1-16,384

  • io1: 4-16,384

  • * st1 and sc1: 125-16,384

  • * standard: 1-1,024

You must specify either a * SnapshotId or a VolumeSize. If you specify both * SnapshotId and VolumeSize, the volume size must be * equal or greater than the size of the snapshot.

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

The volume size, in GiBs. The following are the supported volumes sizes for * each volume type:

  • gp2 and gp3: * 1-16,384

  • io1: 4-16,384

  • * st1 and sc1: 125-16,384

  • * standard: 1-1,024

You must specify either a * SnapshotId or a VolumeSize. If you specify both * SnapshotId and VolumeSize, the volume size must be * equal or greater than the size of the snapshot.

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

The volume size, in GiBs. The following are the supported volumes sizes for * each volume type:

  • gp2 and gp3: * 1-16,384

  • io1: 4-16,384

  • * st1 and sc1: 125-16,384

  • * standard: 1-1,024

You must specify either a * SnapshotId or a VolumeSize. If you specify both * SnapshotId and VolumeSize, the volume size must be * equal or greater than the size of the snapshot.

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

The volume type. For more information, see Amazon * EBS volume types in the Amazon EC2 User Guide for Linux * Instances.

Valid values: standard | io1 | * gp2 | st1 | sc1 | gp3

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

The volume type. For more information, see Amazon * EBS volume types in the Amazon EC2 User Guide for Linux * Instances.

Valid values: standard | io1 | * gp2 | st1 | sc1 | gp3

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

The volume type. For more information, see Amazon * EBS volume types in the Amazon EC2 User Guide for Linux * Instances.

Valid values: standard | io1 | * gp2 | st1 | sc1 | gp3

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

The volume type. For more information, see Amazon * EBS volume types in the Amazon EC2 User Guide for Linux * Instances.

Valid values: standard | io1 | * gp2 | st1 | sc1 | gp3

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

The volume type. For more information, see Amazon * EBS volume types in the Amazon EC2 User Guide for Linux * Instances.

Valid values: standard | io1 | * gp2 | st1 | sc1 | gp3

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

The volume type. For more information, see Amazon * EBS volume types in the Amazon EC2 User Guide for Linux * Instances.

Valid values: standard | io1 | * gp2 | st1 | sc1 | gp3

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

The volume type. For more information, see Amazon * EBS volume types in the Amazon EC2 User Guide for Linux * Instances.

Valid values: standard | io1 | * gp2 | st1 | sc1 | gp3

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

The volume type. For more information, see Amazon * EBS volume types in the Amazon EC2 User Guide for Linux * Instances.

Valid values: standard | io1 | * gp2 | st1 | sc1 | gp3

*/ inline Ebs& WithVolumeType(const char* value) { SetVolumeType(value); return *this;} /** *

Indicates whether the volume is deleted on instance termination. For Amazon * EC2 Auto Scaling, the default value is true.

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

Indicates whether the volume is deleted on instance termination. For Amazon * EC2 Auto Scaling, the default value is true.

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

Indicates whether the volume is deleted on instance termination. For Amazon * EC2 Auto Scaling, the default value is true.

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

Indicates whether the volume is deleted on instance termination. For Amazon * EC2 Auto Scaling, the default value is true.

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

The number of input/output (I/O) operations per second (IOPS) to provision * for the volume. For gp3 and io1 volumes, this * represents the number of IOPS that are provisioned for the volume. For * gp2 volumes, this represents the baseline performance of the volume * and the rate at which the volume accumulates I/O credits for bursting.

*

The following are the supported values for each volume type:

  • *

    gp3: 3,000-16,000 IOPS

  • io1: * 100-64,000 IOPS

For io1 volumes, we guarantee * 64,000 IOPS only for Instances * built on the Nitro System. Other instance families guarantee performance up * to 32,000 IOPS.

Iops is supported when the volume type is * gp3 or io1 and required only when the volume type is * io1. (Not used with standard, gp2, * st1, or sc1 volumes.)

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

The number of input/output (I/O) operations per second (IOPS) to provision * for the volume. For gp3 and io1 volumes, this * represents the number of IOPS that are provisioned for the volume. For * gp2 volumes, this represents the baseline performance of the volume * and the rate at which the volume accumulates I/O credits for bursting.

*

The following are the supported values for each volume type:

  • *

    gp3: 3,000-16,000 IOPS

  • io1: * 100-64,000 IOPS

For io1 volumes, we guarantee * 64,000 IOPS only for Instances * built on the Nitro System. Other instance families guarantee performance up * to 32,000 IOPS.

Iops is supported when the volume type is * gp3 or io1 and required only when the volume type is * io1. (Not used with standard, gp2, * st1, or sc1 volumes.)

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

The number of input/output (I/O) operations per second (IOPS) to provision * for the volume. For gp3 and io1 volumes, this * represents the number of IOPS that are provisioned for the volume. For * gp2 volumes, this represents the baseline performance of the volume * and the rate at which the volume accumulates I/O credits for bursting.

*

The following are the supported values for each volume type:

  • *

    gp3: 3,000-16,000 IOPS

  • io1: * 100-64,000 IOPS

For io1 volumes, we guarantee * 64,000 IOPS only for Instances * built on the Nitro System. Other instance families guarantee performance up * to 32,000 IOPS.

Iops is supported when the volume type is * gp3 or io1 and required only when the volume type is * io1. (Not used with standard, gp2, * st1, or sc1 volumes.)

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

The number of input/output (I/O) operations per second (IOPS) to provision * for the volume. For gp3 and io1 volumes, this * represents the number of IOPS that are provisioned for the volume. For * gp2 volumes, this represents the baseline performance of the volume * and the rate at which the volume accumulates I/O credits for bursting.

*

The following are the supported values for each volume type:

  • *

    gp3: 3,000-16,000 IOPS

  • io1: * 100-64,000 IOPS

For io1 volumes, we guarantee * 64,000 IOPS only for Instances * built on the Nitro System. Other instance families guarantee performance up * to 32,000 IOPS.

Iops is supported when the volume type is * gp3 or io1 and required only when the volume type is * io1. (Not used with standard, gp2, * st1, or sc1 volumes.)

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

Specifies whether the volume should be encrypted. Encrypted EBS volumes can * only be attached to instances that support Amazon EBS encryption. For more * information, see Supported * instance types. If your AMI uses encrypted volumes, you can also only launch * it on supported instance types.

If you are creating a volume from * a snapshot, you cannot create an unencrypted volume from an encrypted snapshot. * Also, you cannot specify a KMS key ID when using a launch configuration.

*

If you enable encryption by default, the EBS volumes that you create are * always encrypted, either using the Amazon Web Services managed KMS key or a * customer-managed KMS key, regardless of whether the snapshot was encrypted.

*

For more information, see Use * Amazon Web Services KMS keys to encrypt Amazon EBS volumes in the Amazon * EC2 Auto Scaling User Guide.

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

Specifies whether the volume should be encrypted. Encrypted EBS volumes can * only be attached to instances that support Amazon EBS encryption. For more * information, see Supported * instance types. If your AMI uses encrypted volumes, you can also only launch * it on supported instance types.

If you are creating a volume from * a snapshot, you cannot create an unencrypted volume from an encrypted snapshot. * Also, you cannot specify a KMS key ID when using a launch configuration.

*

If you enable encryption by default, the EBS volumes that you create are * always encrypted, either using the Amazon Web Services managed KMS key or a * customer-managed KMS key, regardless of whether the snapshot was encrypted.

*

For more information, see Use * Amazon Web Services KMS keys to encrypt Amazon EBS volumes in the Amazon * EC2 Auto Scaling User Guide.

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

Specifies whether the volume should be encrypted. Encrypted EBS volumes can * only be attached to instances that support Amazon EBS encryption. For more * information, see Supported * instance types. If your AMI uses encrypted volumes, you can also only launch * it on supported instance types.

If you are creating a volume from * a snapshot, you cannot create an unencrypted volume from an encrypted snapshot. * Also, you cannot specify a KMS key ID when using a launch configuration.

*

If you enable encryption by default, the EBS volumes that you create are * always encrypted, either using the Amazon Web Services managed KMS key or a * customer-managed KMS key, regardless of whether the snapshot was encrypted.

*

For more information, see Use * Amazon Web Services KMS keys to encrypt Amazon EBS volumes in the Amazon * EC2 Auto Scaling User Guide.

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

Specifies whether the volume should be encrypted. Encrypted EBS volumes can * only be attached to instances that support Amazon EBS encryption. For more * information, see Supported * instance types. If your AMI uses encrypted volumes, you can also only launch * it on supported instance types.

If you are creating a volume from * a snapshot, you cannot create an unencrypted volume from an encrypted snapshot. * Also, you cannot specify a KMS key ID when using a launch configuration.

*

If you enable encryption by default, the EBS volumes that you create are * always encrypted, either using the Amazon Web Services managed KMS key or a * customer-managed KMS key, regardless of whether the snapshot was encrypted.

*

For more information, see Use * Amazon Web Services KMS keys to encrypt Amazon EBS volumes in the Amazon * EC2 Auto Scaling User Guide.

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

The throughput (MiBps) to provision for a gp3 volume.

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

The throughput (MiBps) to provision for a gp3 volume.

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

The throughput (MiBps) to provision for a gp3 volume.

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

The throughput (MiBps) to provision for a gp3 volume.

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