/** * 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 EC2 { namespace Model { /** */ class ModifyVolumeRequest : public EC2Request { public: AWS_EC2_API ModifyVolumeRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ModifyVolume"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline ModifyVolumeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

The ID of the volume.

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

The ID of the volume.

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

The ID of the volume.

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

The ID of the volume.

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

The ID of the volume.

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

The ID of the volume.

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

The ID of the volume.

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

The ID of the volume.

*/ inline ModifyVolumeRequest& WithVolumeId(const char* value) { SetVolumeId(value); return *this;} /** *

The target size of the volume, in GiB. The target volume size must be greater * than or equal to the existing size of the volume.

The following are the * supported volumes sizes for each volume type:

  • gp2 * and gp3: 1-16,384

  • io1 and * io2: 4-16,384

  • st1 and * sc1: 125-16,384

  • standard: * 1-1,024

Default: The existing size is retained.

*/ inline int GetSize() const{ return m_size; } /** *

The target size of the volume, in GiB. The target volume size must be greater * than or equal to the existing size of the volume.

The following are the * supported volumes sizes for each volume type:

  • gp2 * and gp3: 1-16,384

  • io1 and * io2: 4-16,384

  • st1 and * sc1: 125-16,384

  • standard: * 1-1,024

Default: The existing size is retained.

*/ inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; } /** *

The target size of the volume, in GiB. The target volume size must be greater * than or equal to the existing size of the volume.

The following are the * supported volumes sizes for each volume type:

  • gp2 * and gp3: 1-16,384

  • io1 and * io2: 4-16,384

  • st1 and * sc1: 125-16,384

  • standard: * 1-1,024

Default: The existing size is retained.

*/ inline void SetSize(int value) { m_sizeHasBeenSet = true; m_size = value; } /** *

The target size of the volume, in GiB. The target volume size must be greater * than or equal to the existing size of the volume.

The following are the * supported volumes sizes for each volume type:

  • gp2 * and gp3: 1-16,384

  • io1 and * io2: 4-16,384

  • st1 and * sc1: 125-16,384

  • standard: * 1-1,024

Default: The existing size is retained.

*/ inline ModifyVolumeRequest& WithSize(int value) { SetSize(value); return *this;} /** *

The target EBS volume type of the volume. For more information, see Amazon * EBS volume types in the Amazon Elastic Compute Cloud User Guide.

*

Default: The existing type is retained.

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

The target EBS volume type of the volume. For more information, see Amazon * EBS volume types in the Amazon Elastic Compute Cloud User Guide.

*

Default: The existing type is retained.

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

The target EBS volume type of the volume. For more information, see Amazon * EBS volume types in the Amazon Elastic Compute Cloud User Guide.

*

Default: The existing type is retained.

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

The target EBS volume type of the volume. For more information, see Amazon * EBS volume types in the Amazon Elastic Compute Cloud User Guide.

*

Default: The existing type is retained.

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

The target EBS volume type of the volume. For more information, see Amazon * EBS volume types in the Amazon Elastic Compute Cloud User Guide.

*

Default: The existing type is retained.

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

The target EBS volume type of the volume. For more information, see Amazon * EBS volume types in the Amazon Elastic Compute Cloud User Guide.

*

Default: The existing type is retained.

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

The target IOPS rate of the volume. This parameter is valid only for * gp3, io1, and io2 volumes.

The * following are the supported values for each volume type:

  • * gp3: 3,000-16,000 IOPS

  • io1: * 100-64,000 IOPS

  • io2: 100-64,000 IOPS

  • *

Default: The existing value is retained if you keep the same volume * type. If you change the volume type to io1, io2, or * gp3, the default is 3,000.

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

The target IOPS rate of the volume. This parameter is valid only for * gp3, io1, and io2 volumes.

The * following are the supported values for each volume type:

  • * gp3: 3,000-16,000 IOPS

  • io1: * 100-64,000 IOPS

  • io2: 100-64,000 IOPS

  • *

Default: The existing value is retained if you keep the same volume * type. If you change the volume type to io1, io2, or * gp3, the default is 3,000.

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

The target IOPS rate of the volume. This parameter is valid only for * gp3, io1, and io2 volumes.

The * following are the supported values for each volume type:

  • * gp3: 3,000-16,000 IOPS

  • io1: * 100-64,000 IOPS

  • io2: 100-64,000 IOPS

  • *

Default: The existing value is retained if you keep the same volume * type. If you change the volume type to io1, io2, or * gp3, the default is 3,000.

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

The target IOPS rate of the volume. This parameter is valid only for * gp3, io1, and io2 volumes.

The * following are the supported values for each volume type:

  • * gp3: 3,000-16,000 IOPS

  • io1: * 100-64,000 IOPS

  • io2: 100-64,000 IOPS

  • *

Default: The existing value is retained if you keep the same volume * type. If you change the volume type to io1, io2, or * gp3, the default is 3,000.

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

The target throughput of the volume, in MiB/s. This parameter is valid only * for gp3 volumes. The maximum value is 1,000.

Default: The * existing value is retained if the source and target volume type is * gp3. Otherwise, the default value is 125.

Valid Range: * Minimum value of 125. Maximum value of 1000.

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

The target throughput of the volume, in MiB/s. This parameter is valid only * for gp3 volumes. The maximum value is 1,000.

Default: The * existing value is retained if the source and target volume type is * gp3. Otherwise, the default value is 125.

Valid Range: * Minimum value of 125. Maximum value of 1000.

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

The target throughput of the volume, in MiB/s. This parameter is valid only * for gp3 volumes. The maximum value is 1,000.

Default: The * existing value is retained if the source and target volume type is * gp3. Otherwise, the default value is 125.

Valid Range: * Minimum value of 125. Maximum value of 1000.

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

The target throughput of the volume, in MiB/s. This parameter is valid only * for gp3 volumes. The maximum value is 1,000.

Default: The * existing value is retained if the source and target volume type is * gp3. Otherwise, the default value is 125.

Valid Range: * Minimum value of 125. Maximum value of 1000.

*/ inline ModifyVolumeRequest& WithThroughput(int value) { SetThroughput(value); return *this;} /** *

Specifies whether to enable Amazon EBS Multi-Attach. If you enable * Multi-Attach, you can attach the volume to up to 16 * Nitro-based instances in the same Availability Zone. This parameter is * supported with io1 and io2 volumes only. For more * information, see * Amazon EBS Multi-Attach in the Amazon Elastic Compute Cloud User * Guide.

*/ inline bool GetMultiAttachEnabled() const{ return m_multiAttachEnabled; } /** *

Specifies whether to enable Amazon EBS Multi-Attach. If you enable * Multi-Attach, you can attach the volume to up to 16 * Nitro-based instances in the same Availability Zone. This parameter is * supported with io1 and io2 volumes only. For more * information, see * Amazon EBS Multi-Attach in the Amazon Elastic Compute Cloud User * Guide.

*/ inline bool MultiAttachEnabledHasBeenSet() const { return m_multiAttachEnabledHasBeenSet; } /** *

Specifies whether to enable Amazon EBS Multi-Attach. If you enable * Multi-Attach, you can attach the volume to up to 16 * Nitro-based instances in the same Availability Zone. This parameter is * supported with io1 and io2 volumes only. For more * information, see * Amazon EBS Multi-Attach in the Amazon Elastic Compute Cloud User * Guide.

*/ inline void SetMultiAttachEnabled(bool value) { m_multiAttachEnabledHasBeenSet = true; m_multiAttachEnabled = value; } /** *

Specifies whether to enable Amazon EBS Multi-Attach. If you enable * Multi-Attach, you can attach the volume to up to 16 * Nitro-based instances in the same Availability Zone. This parameter is * supported with io1 and io2 volumes only. For more * information, see * Amazon EBS Multi-Attach in the Amazon Elastic Compute Cloud User * Guide.

*/ inline ModifyVolumeRequest& WithMultiAttachEnabled(bool value) { SetMultiAttachEnabled(value); return *this;} private: bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::String m_volumeId; bool m_volumeIdHasBeenSet = false; int m_size; bool m_sizeHasBeenSet = false; VolumeType m_volumeType; bool m_volumeTypeHasBeenSet = false; int m_iops; bool m_iopsHasBeenSet = false; int m_throughput; bool m_throughputHasBeenSet = false; bool m_multiAttachEnabled; bool m_multiAttachEnabledHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws