code: @Override
      public DetachInstancesResult detachInstances(DetachInstancesRequest request) {
          request = beforeClientExecution(request);
          return executeDetachInstances(request);
      }
docs: <p>
  Removes one or more instances from the specified Auto Scaling group.
  </p>
  <p>
  After the instances are detached, you can manage them independent of the Auto Scaling group.
  </p>
  <p>
  If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to
  replace the ones that are detached.
  </p>
  <p>
  If there is a Classic Load Balancer attached to the Auto Scaling group, the instances are deregistered from the
  load balancer. If there are target groups attached to the Auto Scaling group, the instances are deregistered from
  the target groups.
  </p>
  <p>
  For more information, see <a
  href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/detach-instance-asg.html">Detach EC2 Instances from
  Your Auto Scaling Group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.
  </p>
  
  @param detachInstancesRequest
  @return Result of the DetachInstances operation returned by the service.
  @throws ResourceContentionException
  You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling
  group, instance, or load balancer).
  @sample AmazonAutoScaling.DetachInstances
  @see <a href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstances" target="_top">AWS
  API Documentation</a>