public ReplaceRootVolumeTask withTaskState(ReplaceRootVolumeTaskState taskState) {
        this.taskState = taskState.toString();
        return this;
    }
<p>
The state of the task. The task can be in one of the following states:
</p>
<ul>
<li>
<p>
<code>pending</code> - the replacement volume is being created.
</p>
</li>
<li>
<p>
<code>in-progress</code> - the original volume is being detached and the replacement volume is being attached.
</p>
</li>
<li>
<p>
<code>succeeded</code> - the replacement volume has been successfully attached to the instance and the instance
is available.
</p>
</li>
<li>
<p>
<code>failing</code> - the replacement task is in the process of failing.
</p>
</li>
<li>
<p>
<code>failed</code> - the replacement task has failed but the original root volume is still attached.
</p>
</li>
<li>
<p>
<code>failing-detached</code> - the replacement task is in the process of failing. The instance might have no
root volume attached.
</p>
</li>
<li>
<p>
<code>failed-detached</code> - the replacement task has failed and the instance has no root volume attached.
</p>
</li>
</ul>

@param taskState
       The state of the task. The task can be in one of the following states:</p>
       <ul>
       <li>
       <p>
       <code>pending</code> - the replacement volume is being created.
       </p>
       </li>
       <li>
       <p>
       <code>in-progress</code> - the original volume is being detached and the replacement volume is being
       attached.
       </p>
       </li>
       <li>
       <p>
       <code>succeeded</code> - the replacement volume has been successfully attached to the instance and the
       instance is available.
       </p>
       </li>
       <li>
       <p>
       <code>failing</code> - the replacement task is in the process of failing.
       </p>
       </li>
       <li>
       <p>
       <code>failed</code> - the replacement task has failed but the original root volume is still attached.
       </p>
       </li>
       <li>
       <p>
       <code>failing-detached</code> - the replacement task is in the process of failing. The instance might have
       no root volume attached.
       </p>
       </li>
       <li>
       <p>
       <code>failed-detached</code> - the replacement task has failed and the instance has no root volume
       attached.
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
@see ReplaceRootVolumeTaskState
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/ReplaceRootVolumeTask.java