private GetResourceSetResponse getResourceSet()

in aws-route53recoveryreadiness-resourceset/src/main/java/software/amazon/route53recoveryreadiness/resourceset/ReadHandler.java [34:54]


    private GetResourceSetResponse getResourceSet(
            GetResourceSetRequest getRequest,
            ProxyClient<Route53RecoveryReadinessClient> proxyClient
    ) {
        GetResourceSetResponse getResponse;

        try {
            getResponse = proxyClient.injectCredentialsAndInvokeV2(getRequest, proxyClient.client()::getResourceSet);
        } catch (final Route53RecoveryReadinessException e) {
            if (e.statusCode() == 404) {
                throw new CfnNotFoundException(ResourceModel.TYPE_NAME,
                        getRequest.resourceSetName(), e);
            } else
                throw new CfnGeneralServiceException(getRequest.resourceSetName(), e);
        } catch (final AwsServiceException e) {
            throw new CfnGeneralServiceException(ResourceModel.TYPE_NAME, e);
        }

        logger.log(String.format("%s has successfully been read.", ResourceModel.TYPE_NAME));
        return getResponse;
    }