protected ProgressEvent handleRequest()

in aws-networkfirewall-loggingconfiguration/src/main/java/software/amazon/networkfirewall/loggingconfiguration/ReadHandler.java [24:52]


    protected ProgressEvent<ResourceModel, CallbackContext> handleRequest(
        final AmazonWebServicesClientProxy proxy,
        final ResourceHandlerRequest<ResourceModel> request,
        final CallbackContext callbackContext,
        final ProxyClient<NetworkFirewallClient> proxyClient,
        final Logger logger) {

        this.logger = logger;
        final ResourceModel model = request.getDesiredResourceState();

        Utils.validateResourceExists(Translator.translateToReadRequest(model), proxyClient);

        final DescribeLoggingConfigurationRequest describeLoggingConfigurationRequest = Translator.translateToReadRequest(model);
        DescribeLoggingConfigurationResponse describeLoggingConfigurationResponse;
        try {
            describeLoggingConfigurationResponse = proxyClient.injectCredentialsAndInvokeV2(
                    describeLoggingConfigurationRequest, proxyClient.client()::describeLoggingConfiguration);
        } catch (ResourceNotFoundException e) {
            throw new CfnNotFoundException(ResourceModel.TYPE_NAME, e.toString());
        } catch (InvalidRequestException e) {
            throw new CfnInvalidRequestException(describeLoggingConfigurationRequest.toString(), e);
        } catch (InternalServerErrorException e) {
            throw new CfnServiceInternalErrorException(ResourceModel.TYPE_NAME, e);
        } catch (ThrottlingException e) {
            throw new CfnThrottlingException(ResourceModel.TYPE_NAME, e);
        }

        return constructResourceModelFromResponse(describeLoggingConfigurationResponse);
    }