@SdkInternalApi
    final PurchaseCapacityBlockResult executePurchaseCapacityBlock(PurchaseCapacityBlockRequest purchaseCapacityBlockRequest) {

        ExecutionContext executionContext = createExecutionContext(purchaseCapacityBlockRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<PurchaseCapacityBlockRequest> request = null;
        Response<PurchaseCapacityBlockResult> response = null;

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

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

            StaxResponseHandler<PurchaseCapacityBlockResult> responseHandler = new StaxResponseHandler<PurchaseCapacityBlockResult>(
                    new PurchaseCapacityBlockResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Purchase the Capacity Block for use with your account. With Capacity Blocks you ensure GPU capacity is available
for machine learning (ML) workloads. You must specify the ID of the Capacity Block offering you are purchasing.
</p>

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