@SdkInternalApi
    final CompleteVaultLockResult executeCompleteVaultLock(CompleteVaultLockRequest completeVaultLockRequest) {

        ExecutionContext executionContext = createExecutionContext(completeVaultLockRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<CompleteVaultLockRequest> request = null;
        Response<CompleteVaultLockResult> response = null;

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

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
This operation completes the vault locking process by transitioning the vault lock from the
<code>InProgress</code> state to the <code>Locked</code> state, which causes the vault lock policy to become
unchangeable. A vault lock is put into the <code>InProgress</code> state by calling <a>InitiateVaultLock</a>. You
can obtain the state of the vault lock by calling <a>GetVaultLock</a>. For more information about the vault
locking process, <a href="https://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html">Amazon Glacier
Vault Lock</a>.
</p>
<p>
This operation is idempotent. This request is always successful if the vault lock is in the <code>Locked</code>
state and the provided lock ID matches the lock ID originally used to lock the vault.
</p>
<p>
If an invalid lock ID is passed in the request when the vault lock is in the <code>Locked</code> state, the
operation returns an <code>AccessDeniedException</code> error. If an invalid lock ID is passed in the request
when the vault lock is in the <code>InProgress</code> state, the operation throws an
<code>InvalidParameter</code> error.
</p>

@param completeVaultLockRequest
       The input values for <code>CompleteVaultLock</code>.
@return Result of the CompleteVaultLock 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.CompleteVaultLock
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/AmazonGlacierClient.java