@SdkInternalApi
    final DeregisterInstancesFromLoadBalancerResult executeDeregisterInstancesFromLoadBalancer(
            DeregisterInstancesFromLoadBalancerRequest deregisterInstancesFromLoadBalancerRequest) {

        ExecutionContext executionContext = createExecutionContext(deregisterInstancesFromLoadBalancerRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<DeregisterInstancesFromLoadBalancerRequest> request = null;
        Response<DeregisterInstancesFromLoadBalancerResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new DeregisterInstancesFromLoadBalancerRequestMarshaller().marshall(super
                        .beforeMarshalling(deregisterInstancesFromLoadBalancerRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Elastic Load Balancing");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeregisterInstancesFromLoadBalancer");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            StaxResponseHandler<DeregisterInstancesFromLoadBalancerResult> responseHandler = new StaxResponseHandler<DeregisterInstancesFromLoadBalancerResult>(
                    new DeregisterInstancesFromLoadBalancerResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no
longer receives traffic from the load balancer.
</p>
<p>
You can use <a>DescribeLoadBalancers</a> to verify that the instance is deregistered from the load balancer.
</p>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html"
>Register or De-Register EC2 Instances</a> in the <i>Classic Load Balancers Guide</i>.
</p>

@param deregisterInstancesFromLoadBalancerRequest
       Contains the parameters for DeregisterInstancesFromLoadBalancer.
@return Result of the DeregisterInstancesFromLoadBalancer operation returned by the service.
@throws LoadBalancerNotFoundException
        The specified load balancer does not exist.
@throws InvalidInstanceException
        The specified endpoint is not valid.
@sample AmazonElasticLoadBalancing.DeregisterInstancesFromLoadBalancer
@see <a
     href="http://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeregisterInstancesFromLoadBalancer"
     target="_top">AWS API Documentation</a>
aws-java-sdk-elasticloadbalancing/src/main/java/com/amazonaws/services/elasticloadbalancing/AmazonElasticLoadBalancingClient.java