public AutoScalingGroupProvider withManagedTerminationProtection(ManagedTerminationProtection managedTerminationProtection) {
        this.managedTerminationProtection = managedTerminationProtection.toString();
        return this;
    }
<p>
The managed termination protection setting to use for the Auto Scaling group capacity provider. This determines
whether the Auto Scaling group has managed termination protection. The default is off.
</p>
<important>
<p>
When using managed termination protection, managed scaling must also be used otherwise managed termination
protection doesn't work.
</p>
</important>
<p>
When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group
that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in
the Auto Scaling group must have instance protection from scale-in actions on as well. For more information, see
<a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection">
Instance Protection</a> in the <i>Auto Scaling User Guide</i>.
</p>
<p>
When managed termination protection is off, your Amazon EC2 instances aren't protected from termination when the
Auto Scaling group scales in.
</p>

@param managedTerminationProtection
       The managed termination protection setting to use for the Auto Scaling group capacity provider. This
       determines whether the Auto Scaling group has managed termination protection. The default is off.</p>
       <important>
       <p>
       When using managed termination protection, managed scaling must also be used otherwise managed termination
       protection doesn't work.
       </p>
       </important>
       <p>
       When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling
       group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each
       instance in the Auto Scaling group must have instance protection from scale-in actions on as well. For
       more information, see <a href=
       "https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection"
       >Instance Protection</a> in the <i>Auto Scaling User Guide</i>.
       </p>
       <p>
       When managed termination protection is off, your Amazon EC2 instances aren't protected from termination
       when the Auto Scaling group scales in.
@return Returns a reference to this object so that method calls can be chained together.
@see ManagedTerminationProtection
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/AutoScalingGroupProvider.java