private DescribeConnectionResponse readResource()

in aws-events-connection/src/main/java/software/amazon/events/connection/ReadHandler.java [44:54]


    private DescribeConnectionResponse readResource(DescribeConnectionRequest awsRequest, ProxyClient<EventBridgeClient> proxyClient) {
        try {
            DescribeConnectionResponse awsResponse = proxyClient.injectCredentialsAndInvokeV2(awsRequest, proxyClient.client()::describeConnection);
            logger.log(String.format("%s has successfully been read.", ResourceModel.TYPE_NAME));
            return awsResponse;
        } catch (final ResourceNotFoundException e) {
            throw new CfnNotFoundException(ResourceModel.TYPE_NAME, awsRequest.name(), e);
        } catch (final AwsServiceException e) {
            throw new CfnGeneralServiceException(software.amazon.events.connection.ResourceModel.TYPE_NAME, e);
        }
    }