@SdkInternalApi
    final PutEncryptionConfigurationResult executePutEncryptionConfiguration(PutEncryptionConfigurationRequest putEncryptionConfigurationRequest) {

        ExecutionContext executionContext = createExecutionContext(putEncryptionConfigurationRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<PutEncryptionConfigurationRequest> request = null;
        Response<PutEncryptionConfigurationResult> response = null;

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

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Creates or updates the encryption configuration. Amazon Web Services IoT FleetWise can encrypt your data and
resources using an Amazon Web Services managed key. Or, you can use a KMS key that you own and manage. For more
information, see <a
href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/data-encryption.html">Data encryption</a>
in the <i>Amazon Web Services IoT FleetWise Developer Guide</i>.
</p>

@param putEncryptionConfigurationRequest
@return Result of the PutEncryptionConfiguration operation returned by the service.
@throws ResourceNotFoundException
        The resource wasn't found.
@throws InternalServerException
        The request couldn't be completed because the server temporarily failed.
@throws ConflictException
        The request has conflicting operations. This can occur if you're trying to perform more than one
        operation on the same resource at the same time.
@throws ThrottlingException
        The request couldn't be completed due to throttling.
@throws ValidationException
        The input fails to satisfy the constraints specified by an Amazon Web Services service.
@throws AccessDeniedException
        You don't have sufficient permission to perform this action.
@sample AWSIoTFleetWise.PutEncryptionConfiguration
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/iotfleetwise-2021-06-17/PutEncryptionConfiguration"
     target="_top">AWS API Documentation</a>
aws-java-sdk-iotfleetwise/src/main/java/com/amazonaws/services/iotfleetwise/AWSIoTFleetWiseClient.java