@SdkInternalApi
    final DeleteLedgerResult executeDeleteLedger(DeleteLedgerRequest deleteLedgerRequest) {

        ExecutionContext executionContext = createExecutionContext(deleteLedgerRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<DeleteLedgerRequest> request = null;
        Response<DeleteLedgerResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new DeleteLedgerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteLedgerRequest));
                // 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, "QLDB");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteLedger");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

            HttpResponseHandler<AmazonWebServiceResponse<DeleteLedgerResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteLedgerResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Deletes a ledger and all of its contents. This action is irreversible.
</p>
<p>
If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it
by calling the <code>UpdateLedger</code> operation to set this parameter to <code>false</code>.
</p>

@param deleteLedgerRequest
@return Result of the DeleteLedger operation returned by the service.
@throws InvalidParameterException
        One or more parameters in the request aren't valid.
@throws ResourceNotFoundException
        The specified resource doesn't exist.
@throws ResourceInUseException
        The specified resource can't be modified at this time.
@throws ResourcePreconditionNotMetException
        The operation failed because a condition wasn't satisfied in advance.
@sample AmazonQLDB.DeleteLedger
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DeleteLedger" target="_top">AWS API
     Documentation</a>
aws-java-sdk-qldb/src/main/java/com/amazonaws/services/qldb/AmazonQLDBClient.java