@SdkInternalApi
    final CreateInvalidationResult executeCreateInvalidation(CreateInvalidationRequest createInvalidationRequest) {

        ExecutionContext executionContext = createExecutionContext(createInvalidationRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<CreateInvalidationRequest> request = null;
        Response<CreateInvalidationResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new CreateInvalidationRequestMarshaller().marshall(super.beforeMarshalling(createInvalidationRequest));
                // 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, "CloudFront");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateInvalidation");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

            StaxResponseHandler<CreateInvalidationResult> responseHandler = new StaxResponseHandler<CreateInvalidationResult>(
                    new CreateInvalidationResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Create a new invalidation. For more information, see <a
href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html">Invalidating
files</a> in the <i>Amazon CloudFront Developer Guide</i>.
</p>

@param createInvalidationRequest
       The request to create an invalidation.
@return Result of the CreateInvalidation operation returned by the service.
@throws AccessDeniedException
        Access denied.
@throws MissingBodyException
        This operation requires a body. Ensure that the body is present and the <code>Content-Type</code> header
        is set.
@throws InvalidArgumentException
        An argument is invalid.
@throws NoSuchDistributionException
        The specified distribution does not exist.
@throws BatchTooLargeException
        Invalidation batch specified is too large.
@throws TooManyInvalidationsInProgressException
        You have exceeded the maximum number of allowable InProgress invalidation batch requests, or invalidation
        objects.
@throws InconsistentQuantitiesException
        The value of <code>Quantity</code> and the size of <code>Items</code> don't match.
@sample AmazonCloudFront.CreateInvalidation
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateInvalidation" target="_top">AWS
     API Documentation</a>
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/AmazonCloudFrontClient.java