@SdkInternalApi
    final UpdatePublicKeyResult executeUpdatePublicKey(UpdatePublicKeyRequest updatePublicKeyRequest) {

        ExecutionContext executionContext = createExecutionContext(updatePublicKeyRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<UpdatePublicKeyRequest> request = null;
        Response<UpdatePublicKeyResult> response = null;

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

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

            StaxResponseHandler<UpdatePublicKeyResult> responseHandler = new StaxResponseHandler<UpdatePublicKeyResult>(
                    new UpdatePublicKeyResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Update public key information. Note that the only value you can change is the comment.
</p>

@param updatePublicKeyRequest
@return Result of the UpdatePublicKey operation returned by the service.
@throws AccessDeniedException
        Access denied.
@throws CannotChangeImmutablePublicKeyFieldsException
        You can't change the value of a public key.
@throws InvalidArgumentException
        An argument is invalid.
@throws InvalidIfMatchVersionException
        The <code>If-Match</code> version is missing or not valid.
@throws IllegalUpdateException
        The update contains modifications that are not allowed.
@throws NoSuchPublicKeyException
        The specified public key doesn't exist.
@throws PreconditionFailedException
        The precondition in one or more of the request fields evaluated to <code>false</code>.
@sample AmazonCloudFront.UpdatePublicKey
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdatePublicKey" target="_top">AWS API
     Documentation</a>
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/AmazonCloudFrontClient.java