/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class CreateReplaceRootVolumeTaskRequest : public EC2Request { public: AWS_EC2_API CreateReplaceRootVolumeTaskRequest(); // 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 "CreateReplaceRootVolumeTask"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The ID of the instance for which to replace the root volume.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The ID of the instance for which to replace the root volume.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The ID of the instance for which to replace the root volume.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The ID of the instance for which to replace the root volume.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The ID of the instance for which to replace the root volume.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The ID of the instance for which to replace the root volume.

*/ inline CreateReplaceRootVolumeTaskRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance for which to replace the root volume.

*/ inline CreateReplaceRootVolumeTaskRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The ID of the instance for which to replace the root volume.

*/ inline CreateReplaceRootVolumeTaskRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

The ID of the snapshot from which to restore the replacement root volume. The * specified snapshot must be a snapshot that you previously created from the * original root volume.

If you want to restore the replacement root volume * to the initial launch state, or if you want to restore the replacement root * volume from an AMI, omit this parameter.

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

The ID of the snapshot from which to restore the replacement root volume. The * specified snapshot must be a snapshot that you previously created from the * original root volume.

If you want to restore the replacement root volume * to the initial launch state, or if you want to restore the replacement root * volume from an AMI, omit this parameter.

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

The ID of the snapshot from which to restore the replacement root volume. The * specified snapshot must be a snapshot that you previously created from the * original root volume.

If you want to restore the replacement root volume * to the initial launch state, or if you want to restore the replacement root * volume from an AMI, omit this parameter.

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

The ID of the snapshot from which to restore the replacement root volume. The * specified snapshot must be a snapshot that you previously created from the * original root volume.

If you want to restore the replacement root volume * to the initial launch state, or if you want to restore the replacement root * volume from an AMI, omit this parameter.

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

The ID of the snapshot from which to restore the replacement root volume. The * specified snapshot must be a snapshot that you previously created from the * original root volume.

If you want to restore the replacement root volume * to the initial launch state, or if you want to restore the replacement root * volume from an AMI, omit this parameter.

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

The ID of the snapshot from which to restore the replacement root volume. The * specified snapshot must be a snapshot that you previously created from the * original root volume.

If you want to restore the replacement root volume * to the initial launch state, or if you want to restore the replacement root * volume from an AMI, omit this parameter.

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

The ID of the snapshot from which to restore the replacement root volume. The * specified snapshot must be a snapshot that you previously created from the * original root volume.

If you want to restore the replacement root volume * to the initial launch state, or if you want to restore the replacement root * volume from an AMI, omit this parameter.

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

The ID of the snapshot from which to restore the replacement root volume. The * specified snapshot must be a snapshot that you previously created from the * original root volume.

If you want to restore the replacement root volume * to the initial launch state, or if you want to restore the replacement root * volume from an AMI, omit this parameter.

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

Unique, case-sensitive identifier you provide to ensure the idempotency of * the request. If you do not specify a client token, a randomly generated token is * used for the request to ensure idempotency. For more information, see Ensuring * idempotency.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Unique, case-sensitive identifier you provide to ensure the idempotency of * the request. If you do not specify a client token, a randomly generated token is * used for the request to ensure idempotency. For more information, see Ensuring * idempotency.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Unique, case-sensitive identifier you provide to ensure the idempotency of * the request. If you do not specify a client token, a randomly generated token is * used for the request to ensure idempotency. For more information, see Ensuring * idempotency.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Unique, case-sensitive identifier you provide to ensure the idempotency of * the request. If you do not specify a client token, a randomly generated token is * used for the request to ensure idempotency. For more information, see Ensuring * idempotency.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Unique, case-sensitive identifier you provide to ensure the idempotency of * the request. If you do not specify a client token, a randomly generated token is * used for the request to ensure idempotency. For more information, see Ensuring * idempotency.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Unique, case-sensitive identifier you provide to ensure the idempotency of * the request. If you do not specify a client token, a randomly generated token is * used for the request to ensure idempotency. For more information, see Ensuring * idempotency.

*/ inline CreateReplaceRootVolumeTaskRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

Unique, case-sensitive identifier you provide to ensure the idempotency of * the request. If you do not specify a client token, a randomly generated token is * used for the request to ensure idempotency. For more information, see Ensuring * idempotency.

*/ inline CreateReplaceRootVolumeTaskRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

Unique, case-sensitive identifier you provide to ensure the idempotency of * the request. If you do not specify a client token, a randomly generated token is * used for the request to ensure idempotency. For more information, see Ensuring * idempotency.

*/ inline CreateReplaceRootVolumeTaskRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

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 CreateReplaceRootVolumeTaskRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

The tags to apply to the root volume replacement task.

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

The tags to apply to the root volume replacement task.

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

The tags to apply to the root volume replacement task.

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

The tags to apply to the root volume replacement task.

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

The tags to apply to the root volume replacement task.

*/ inline CreateReplaceRootVolumeTaskRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

The tags to apply to the root volume replacement task.

*/ inline CreateReplaceRootVolumeTaskRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

The tags to apply to the root volume replacement task.

*/ inline CreateReplaceRootVolumeTaskRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

The tags to apply to the root volume replacement task.

*/ inline CreateReplaceRootVolumeTaskRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } /** *

The ID of the AMI to use to restore the root volume. The specified AMI must * have the same product code, billing information, architecture type, and * virtualization type as that of the instance.

If you want to restore the * replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter.

*/ inline const Aws::String& GetImageId() const{ return m_imageId; } /** *

The ID of the AMI to use to restore the root volume. The specified AMI must * have the same product code, billing information, architecture type, and * virtualization type as that of the instance.

If you want to restore the * replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter.

*/ inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; } /** *

The ID of the AMI to use to restore the root volume. The specified AMI must * have the same product code, billing information, architecture type, and * virtualization type as that of the instance.

If you want to restore the * replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter.

*/ inline void SetImageId(const Aws::String& value) { m_imageIdHasBeenSet = true; m_imageId = value; } /** *

The ID of the AMI to use to restore the root volume. The specified AMI must * have the same product code, billing information, architecture type, and * virtualization type as that of the instance.

If you want to restore the * replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter.

*/ inline void SetImageId(Aws::String&& value) { m_imageIdHasBeenSet = true; m_imageId = std::move(value); } /** *

The ID of the AMI to use to restore the root volume. The specified AMI must * have the same product code, billing information, architecture type, and * virtualization type as that of the instance.

If you want to restore the * replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter.

*/ inline void SetImageId(const char* value) { m_imageIdHasBeenSet = true; m_imageId.assign(value); } /** *

The ID of the AMI to use to restore the root volume. The specified AMI must * have the same product code, billing information, architecture type, and * virtualization type as that of the instance.

If you want to restore the * replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter.

*/ inline CreateReplaceRootVolumeTaskRequest& WithImageId(const Aws::String& value) { SetImageId(value); return *this;} /** *

The ID of the AMI to use to restore the root volume. The specified AMI must * have the same product code, billing information, architecture type, and * virtualization type as that of the instance.

If you want to restore the * replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter.

*/ inline CreateReplaceRootVolumeTaskRequest& WithImageId(Aws::String&& value) { SetImageId(std::move(value)); return *this;} /** *

The ID of the AMI to use to restore the root volume. The specified AMI must * have the same product code, billing information, architecture type, and * virtualization type as that of the instance.

If you want to restore the * replacement volume from a specific snapshot, or if you want to restore it to its * launch state, omit this parameter.

*/ inline CreateReplaceRootVolumeTaskRequest& WithImageId(const char* value) { SetImageId(value); return *this;} /** *

Indicates whether to automatically delete the original root volume after the * root volume replacement task completes. To delete the original root volume, * specify true. If you choose to keep the original root volume after * the replacement task completes, you must manually delete it when you no longer * need it.

*/ inline bool GetDeleteReplacedRootVolume() const{ return m_deleteReplacedRootVolume; } /** *

Indicates whether to automatically delete the original root volume after the * root volume replacement task completes. To delete the original root volume, * specify true. If you choose to keep the original root volume after * the replacement task completes, you must manually delete it when you no longer * need it.

*/ inline bool DeleteReplacedRootVolumeHasBeenSet() const { return m_deleteReplacedRootVolumeHasBeenSet; } /** *

Indicates whether to automatically delete the original root volume after the * root volume replacement task completes. To delete the original root volume, * specify true. If you choose to keep the original root volume after * the replacement task completes, you must manually delete it when you no longer * need it.

*/ inline void SetDeleteReplacedRootVolume(bool value) { m_deleteReplacedRootVolumeHasBeenSet = true; m_deleteReplacedRootVolume = value; } /** *

Indicates whether to automatically delete the original root volume after the * root volume replacement task completes. To delete the original root volume, * specify true. If you choose to keep the original root volume after * the replacement task completes, you must manually delete it when you no longer * need it.

*/ inline CreateReplaceRootVolumeTaskRequest& WithDeleteReplacedRootVolume(bool value) { SetDeleteReplacedRootVolume(value); return *this;} private: Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; Aws::String m_imageId; bool m_imageIdHasBeenSet = false; bool m_deleteReplacedRootVolume; bool m_deleteReplacedRootVolumeHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws