/** * 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 Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Information about a root volume replacement task.

See Also:

* AWS * API Reference

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

The ID of the root volume replacement task.

*/ inline const Aws::String& GetReplaceRootVolumeTaskId() const{ return m_replaceRootVolumeTaskId; } /** *

The ID of the root volume replacement task.

*/ inline bool ReplaceRootVolumeTaskIdHasBeenSet() const { return m_replaceRootVolumeTaskIdHasBeenSet; } /** *

The ID of the root volume replacement task.

*/ inline void SetReplaceRootVolumeTaskId(const Aws::String& value) { m_replaceRootVolumeTaskIdHasBeenSet = true; m_replaceRootVolumeTaskId = value; } /** *

The ID of the root volume replacement task.

*/ inline void SetReplaceRootVolumeTaskId(Aws::String&& value) { m_replaceRootVolumeTaskIdHasBeenSet = true; m_replaceRootVolumeTaskId = std::move(value); } /** *

The ID of the root volume replacement task.

*/ inline void SetReplaceRootVolumeTaskId(const char* value) { m_replaceRootVolumeTaskIdHasBeenSet = true; m_replaceRootVolumeTaskId.assign(value); } /** *

The ID of the root volume replacement task.

*/ inline ReplaceRootVolumeTask& WithReplaceRootVolumeTaskId(const Aws::String& value) { SetReplaceRootVolumeTaskId(value); return *this;} /** *

The ID of the root volume replacement task.

*/ inline ReplaceRootVolumeTask& WithReplaceRootVolumeTaskId(Aws::String&& value) { SetReplaceRootVolumeTaskId(std::move(value)); return *this;} /** *

The ID of the root volume replacement task.

*/ inline ReplaceRootVolumeTask& WithReplaceRootVolumeTaskId(const char* value) { SetReplaceRootVolumeTaskId(value); return *this;} /** *

The ID of the instance for which the root volume replacement task was * created.

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

The ID of the instance for which the root volume replacement task was * created.

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

The ID of the instance for which the root volume replacement task was * created.

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

The ID of the instance for which the root volume replacement task was * created.

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

The ID of the instance for which the root volume replacement task was * created.

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

The ID of the instance for which the root volume replacement task was * created.

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

The ID of the instance for which the root volume replacement task was * created.

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

The ID of the instance for which the root volume replacement task was * created.

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

The state of the task. The task can be in one of the following states:

*
  • pending - the replacement volume is being * created.

  • in-progress - the original volume is * being detached and the replacement volume is being attached.

  • * succeeded - the replacement volume has been successfully attached * to the instance and the instance is available.

  • * failing - the replacement task is in the process of failing.

    *
  • failed - the replacement task has failed but the * original root volume is still attached.

  • * failing-detached - the replacement task is in the process of * failing. The instance might have no root volume attached.

  • * failed-detached - the replacement task has failed and the instance * has no root volume attached.

*/ inline const ReplaceRootVolumeTaskState& GetTaskState() const{ return m_taskState; } /** *

The state of the task. The task can be in one of the following states:

*
  • pending - the replacement volume is being * created.

  • in-progress - the original volume is * being detached and the replacement volume is being attached.

  • * succeeded - the replacement volume has been successfully attached * to the instance and the instance is available.

  • * failing - the replacement task is in the process of failing.

    *
  • failed - the replacement task has failed but the * original root volume is still attached.

  • * failing-detached - the replacement task is in the process of * failing. The instance might have no root volume attached.

  • * failed-detached - the replacement task has failed and the instance * has no root volume attached.

*/ inline bool TaskStateHasBeenSet() const { return m_taskStateHasBeenSet; } /** *

The state of the task. The task can be in one of the following states:

*
  • pending - the replacement volume is being * created.

  • in-progress - the original volume is * being detached and the replacement volume is being attached.

  • * succeeded - the replacement volume has been successfully attached * to the instance and the instance is available.

  • * failing - the replacement task is in the process of failing.

    *
  • failed - the replacement task has failed but the * original root volume is still attached.

  • * failing-detached - the replacement task is in the process of * failing. The instance might have no root volume attached.

  • * failed-detached - the replacement task has failed and the instance * has no root volume attached.

*/ inline void SetTaskState(const ReplaceRootVolumeTaskState& value) { m_taskStateHasBeenSet = true; m_taskState = value; } /** *

The state of the task. The task can be in one of the following states:

*
  • pending - the replacement volume is being * created.

  • in-progress - the original volume is * being detached and the replacement volume is being attached.

  • * succeeded - the replacement volume has been successfully attached * to the instance and the instance is available.

  • * failing - the replacement task is in the process of failing.

    *
  • failed - the replacement task has failed but the * original root volume is still attached.

  • * failing-detached - the replacement task is in the process of * failing. The instance might have no root volume attached.

  • * failed-detached - the replacement task has failed and the instance * has no root volume attached.

*/ inline void SetTaskState(ReplaceRootVolumeTaskState&& value) { m_taskStateHasBeenSet = true; m_taskState = std::move(value); } /** *

The state of the task. The task can be in one of the following states:

*
  • pending - the replacement volume is being * created.

  • in-progress - the original volume is * being detached and the replacement volume is being attached.

  • * succeeded - the replacement volume has been successfully attached * to the instance and the instance is available.

  • * failing - the replacement task is in the process of failing.

    *
  • failed - the replacement task has failed but the * original root volume is still attached.

  • * failing-detached - the replacement task is in the process of * failing. The instance might have no root volume attached.

  • * failed-detached - the replacement task has failed and the instance * has no root volume attached.

*/ inline ReplaceRootVolumeTask& WithTaskState(const ReplaceRootVolumeTaskState& value) { SetTaskState(value); return *this;} /** *

The state of the task. The task can be in one of the following states:

*
  • pending - the replacement volume is being * created.

  • in-progress - the original volume is * being detached and the replacement volume is being attached.

  • * succeeded - the replacement volume has been successfully attached * to the instance and the instance is available.

  • * failing - the replacement task is in the process of failing.

    *
  • failed - the replacement task has failed but the * original root volume is still attached.

  • * failing-detached - the replacement task is in the process of * failing. The instance might have no root volume attached.

  • * failed-detached - the replacement task has failed and the instance * has no root volume attached.

*/ inline ReplaceRootVolumeTask& WithTaskState(ReplaceRootVolumeTaskState&& value) { SetTaskState(std::move(value)); return *this;} /** *

The time the task was started.

*/ inline const Aws::String& GetStartTime() const{ return m_startTime; } /** *

The time the task was started.

*/ inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; } /** *

The time the task was started.

*/ inline void SetStartTime(const Aws::String& value) { m_startTimeHasBeenSet = true; m_startTime = value; } /** *

The time the task was started.

*/ inline void SetStartTime(Aws::String&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); } /** *

The time the task was started.

*/ inline void SetStartTime(const char* value) { m_startTimeHasBeenSet = true; m_startTime.assign(value); } /** *

The time the task was started.

*/ inline ReplaceRootVolumeTask& WithStartTime(const Aws::String& value) { SetStartTime(value); return *this;} /** *

The time the task was started.

*/ inline ReplaceRootVolumeTask& WithStartTime(Aws::String&& value) { SetStartTime(std::move(value)); return *this;} /** *

The time the task was started.

*/ inline ReplaceRootVolumeTask& WithStartTime(const char* value) { SetStartTime(value); return *this;} /** *

The time the task completed.

*/ inline const Aws::String& GetCompleteTime() const{ return m_completeTime; } /** *

The time the task completed.

*/ inline bool CompleteTimeHasBeenSet() const { return m_completeTimeHasBeenSet; } /** *

The time the task completed.

*/ inline void SetCompleteTime(const Aws::String& value) { m_completeTimeHasBeenSet = true; m_completeTime = value; } /** *

The time the task completed.

*/ inline void SetCompleteTime(Aws::String&& value) { m_completeTimeHasBeenSet = true; m_completeTime = std::move(value); } /** *

The time the task completed.

*/ inline void SetCompleteTime(const char* value) { m_completeTimeHasBeenSet = true; m_completeTime.assign(value); } /** *

The time the task completed.

*/ inline ReplaceRootVolumeTask& WithCompleteTime(const Aws::String& value) { SetCompleteTime(value); return *this;} /** *

The time the task completed.

*/ inline ReplaceRootVolumeTask& WithCompleteTime(Aws::String&& value) { SetCompleteTime(std::move(value)); return *this;} /** *

The time the task completed.

*/ inline ReplaceRootVolumeTask& WithCompleteTime(const char* value) { SetCompleteTime(value); return *this;} /** *

The tags assigned to the task.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tags assigned to the task.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tags assigned to the task.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tags assigned to the task.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tags assigned to the task.

*/ inline ReplaceRootVolumeTask& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The tags assigned to the task.

*/ inline ReplaceRootVolumeTask& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The tags assigned to the task.

*/ inline ReplaceRootVolumeTask& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The tags assigned to the task.

*/ inline ReplaceRootVolumeTask& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The ID of the AMI used to create the replacement root volume.

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

The ID of the AMI used to create the replacement root volume.

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

The ID of the AMI used to create the replacement root volume.

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

The ID of the AMI used to create the replacement root volume.

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

The ID of the AMI used to create the replacement root volume.

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

The ID of the AMI used to create the replacement root volume.

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

The ID of the AMI used to create the replacement root volume.

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

The ID of the AMI used to create the replacement root volume.

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

The ID of the snapshot used to create the replacement root volume.

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

The ID of the snapshot used to create the replacement root volume.

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

The ID of the snapshot used to create the replacement root volume.

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

The ID of the snapshot used to create the replacement root volume.

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

The ID of the snapshot used to create the replacement root volume.

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

The ID of the snapshot used to create the replacement root volume.

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

The ID of the snapshot used to create the replacement root volume.

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

The ID of the snapshot used to create the replacement root volume.

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

Indicates whether the original root volume is to be deleted after the root * volume replacement task completes.

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

Indicates whether the original root volume is to be deleted after the root * volume replacement task completes.

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

Indicates whether the original root volume is to be deleted after the root * volume replacement task completes.

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

Indicates whether the original root volume is to be deleted after the root * volume replacement task completes.

*/ inline ReplaceRootVolumeTask& WithDeleteReplacedRootVolume(bool value) { SetDeleteReplacedRootVolume(value); return *this;} private: Aws::String m_replaceRootVolumeTaskId; bool m_replaceRootVolumeTaskIdHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; ReplaceRootVolumeTaskState m_taskState; bool m_taskStateHasBeenSet = false; Aws::String m_startTime; bool m_startTimeHasBeenSet = false; Aws::String m_completeTime; bool m_completeTimeHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::String m_imageId; bool m_imageIdHasBeenSet = false; Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet = false; bool m_deleteReplacedRootVolume; bool m_deleteReplacedRootVolumeHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws