@SdkInternalApi
    final CompleteMultipartUploadResult executeCompleteMultipartUpload(CompleteMultipartUploadRequest completeMultipartUploadRequest) {

        ExecutionContext executionContext = createExecutionContext(completeMultipartUploadRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<CompleteMultipartUploadRequest> request = null;
        Response<CompleteMultipartUploadResult> response = null;

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

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
You call this operation to inform Amazon S3 Glacier (Glacier) that all the archive parts have been uploaded and
that Glacier can now assemble the archive from the uploaded parts. After assembling and saving the archive to the
vault, Glacier returns the URI path of the newly created archive resource. Using the URI path, you can then
access the archive. After you upload an archive, you should save the archive ID returned to retrieve the archive
at a later point. You can also get the vault inventory to obtain a list of archive IDs in a vault. For more
information, see <a>InitiateJob</a>.
</p>
<p>
In the request, you must include the computed SHA256 tree hash of the entire archive you have uploaded. For
information about computing a SHA256 tree hash, see <a
href="https://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html">Computing Checksums</a>.
On the server side, Glacier also constructs the SHA256 tree hash of the assembled archive. If the values match,
Glacier saves the archive to the vault; otherwise, it returns an error, and the operation fails. The
<a>ListParts</a> operation returns a list of parts uploaded for a specific multipart upload. It includes checksum
information for each uploaded part that can be used to debug a bad checksum issue.
</p>
<p>
Additionally, Glacier also checks for any missing content ranges when assembling the archive, if missing content
ranges are found, Glacier returns an error and the operation fails.
</p>
<p>
Complete Multipart Upload is an idempotent operation. After your first successful complete multipart upload, if
you call the operation again within a short period, the operation will succeed and return the same archive ID.
This is useful in the event you experience a network issue that causes an aborted connection or receive a 500
server error, in which case you can repeat your Complete Multipart Upload request and get the same archive ID
without creating duplicate archives. Note, however, that after the multipart upload completes, you cannot call
the List Parts operation and the multipart upload will not appear in List Multipart Uploads response, even if
idempotent complete is possible.
</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/uploading-archive-mpu.html">Uploading Large Archives
in Parts (Multipart Upload)</a> and <a
href="https://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-complete-upload.html">Complete Multipart
Upload</a> in the <i>Amazon Glacier Developer Guide</i>.
</p>

@param completeMultipartUploadRequest
       Provides options to complete a multipart upload operation. This informs Amazon Glacier that all the
       archive parts have been uploaded and Amazon S3 Glacier (Glacier) can now assemble the archive from the
       uploaded parts. After assembling and saving the archive to the vault, Glacier returns the URI path of the
       newly created archive resource.
@return Result of the CompleteMultipartUpload 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.CompleteMultipartUpload
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/AmazonGlacierClient.java