public RefreshPreferences withAutoRollback(Boolean autoRollback) {
        setAutoRollback(autoRollback);
        return this;
    }
<p>
(Optional) Indicates whether to roll back the Auto Scaling group to its previous configuration if the instance
refresh fails or a CloudWatch alarm threshold is met. The default is <code>false</code>.
</p>
<p>
A rollback is not supported in the following situations:
</p>
<ul>
<li>
<p>
There is no desired configuration specified for the instance refresh.
</p>
</li>
<li>
<p>
The Auto Scaling group has a launch template that uses an Amazon Web Services Systems Manager parameter instead
of an AMI ID for the <code>ImageId</code> property.
</p>
</li>
<li>
<p>
The Auto Scaling group uses the launch template's <code>$Latest</code> or <code>$Default</code> version.
</p>
</li>
</ul>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/instance-refresh-rollback.html">Undo changes with a
rollback</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.
</p>

@param autoRollback
       (Optional) Indicates whether to roll back the Auto Scaling group to its previous configuration if the
       instance refresh fails or a CloudWatch alarm threshold is met. The default is <code>false</code>.</p>
       <p>
       A rollback is not supported in the following situations:
       </p>
       <ul>
       <li>
       <p>
       There is no desired configuration specified for the instance refresh.
       </p>
       </li>
       <li>
       <p>
       The Auto Scaling group has a launch template that uses an Amazon Web Services Systems Manager parameter
       instead of an AMI ID for the <code>ImageId</code> property.
       </p>
       </li>
       <li>
       <p>
       The Auto Scaling group uses the launch template's <code>$Latest</code> or <code>$Default</code> version.
       </p>
       </li>
       </ul>
       <p>
       For more information, see <a
       href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/instance-refresh-rollback.html">Undo changes
       with a rollback</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/model/RefreshPreferences.java