@SdkInternalApi
    final LockSnapshotResult executeLockSnapshot(LockSnapshotRequest lockSnapshotRequest) {

        ExecutionContext executionContext = createExecutionContext(lockSnapshotRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<LockSnapshotRequest> request = null;
        Response<LockSnapshotResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new LockSnapshotRequestMarshaller().marshall(super.beforeMarshalling(lockSnapshotRequest));
                // 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, "EC2");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "LockSnapshot");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

            StaxResponseHandler<LockSnapshotResult> responseHandler = new StaxResponseHandler<LockSnapshotResult>(new LockSnapshotResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Locks an Amazon EBS snapshot in either <i>governance</i> or <i>compliance</i> mode to protect it against
accidental or malicious deletions for a specific duration. A locked snapshot can't be deleted.
</p>
<p>
You can also use this action to modify the lock settings for a snapshot that is already locked. The allowed
modifications depend on the lock mode and lock state:
</p>
<ul>
<li>
<p>
If the snapshot is locked in governance mode, you can modify the lock mode and the lock duration or lock
expiration date.
</p>
</li>
<li>
<p>
If the snapshot is locked in compliance mode and it is in the cooling-off period, you can modify the lock mode
and the lock duration or lock expiration date.
</p>
</li>
<li>
<p>
If the snapshot is locked in compliance mode and the cooling-off period has lapsed, you can only increase the
lock duration or extend the lock expiration date.
</p>
</li>
</ul>

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