@SdkInternalApi
    final DeleteArchiveResult executeDeleteArchive(DeleteArchiveRequest deleteArchiveRequest) {

        ExecutionContext executionContext = createExecutionContext(deleteArchiveRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<DeleteArchiveRequest> request = null;
        Response<DeleteArchiveResult> response = null;

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

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
This operation deletes an archive from a vault. Subsequent requests to initiate a retrieval of this archive will
fail. Archive retrievals that are in progress for this archive ID may or may not succeed according to the
following scenarios:
</p>
<ul>
<li>
<p>
If the archive retrieval job is actively preparing the data for download when Amazon S3 Glacier receives the
delete archive request, the archival retrieval operation might fail.
</p>
</li>
<li>
<p>
If the archive retrieval job has successfully prepared the archive for download when Amazon S3 Glacier receives
the delete archive request, you will be able to download the output.
</p>
</li>
</ul>
<p>
This operation is idempotent. Attempting to delete an already-deleted archive does not result in an error.
</p>
<p>
An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access
Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform
specific actions. For more information, see <a
href="https://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control
Using AWS Identity and Access Management (IAM)</a>.
</p>
<p>
For conceptual information and underlying REST API, see <a
href="https://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-an-archive.html">Deleting an Archive in
Amazon Glacier</a> and <a
href="https://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html">Delete Archive</a> in the
<i>Amazon Glacier Developer Guide</i>.
</p>

@param deleteArchiveRequest
       Provides options for deleting an archive from an Amazon S3 Glacier vault.
@return Result of the DeleteArchive operation returned by the service.
@throws ResourceNotFoundException
        Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.
@throws InvalidParameterValueException
        Returned if a parameter of the request is incorrectly specified.
@throws MissingParameterValueException
        Returned if a required header or parameter is missing from the request.
@throws ServiceUnavailableException
        Returned if the service cannot complete the request.
@sample AmazonGlacier.DeleteArchive
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/AmazonGlacierClient.java