@Override
    public DeregisterImageResult deregisterImage(DeregisterImageRequest request) {
        request = beforeClientExecution(request);
        return executeDeregisterImage(request);
    }
<p>
Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances.
</p>
<p>
If you deregister an AMI that matches a Recycle Bin retention rule, the AMI is retained in the Recycle Bin for
the specified retention period. For more information, see <a
href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">Recycle Bin</a> in the <i>Amazon EC2
User Guide</i>.
</p>
<p>
When you deregister an AMI, it doesn't affect any instances that you've already launched from the AMI. You'll
continue to incur usage costs for those instances until you terminate them.
</p>
<p>
When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the root volume
of the instance during the AMI creation process. When you deregister an instance store-backed AMI, it doesn't
affect the files that you uploaded to Amazon S3 when you created the AMI.
</p>

@param deregisterImageRequest
       Contains the parameters for DeregisterImage.
@return Result of the DeregisterImage operation returned by the service.
@sample AmazonEC2.DeregisterImage
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage" target="_top">AWS API
     Documentation</a>
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/AmazonEC2Client.java