in aws-events-apidestination/src/main/java/software/amazon/events/apidestination/ReadHandler.java [43:54]
private DescribeApiDestinationResponse readResource(DescribeApiDestinationRequest awsRequest, ProxyClient<EventBridgeClient> proxyClient) {
DescribeApiDestinationResponse awsResponse;
try {
awsResponse = proxyClient.injectCredentialsAndInvokeV2(awsRequest, proxyClient.client()::describeApiDestination);
} catch (final ResourceNotFoundException e) {
throw new CfnNotFoundException(ResourceModel.TYPE_NAME, awsRequest.name(), e);
} catch (final AwsServiceException e) {
throw new CfnGeneralServiceException(software.amazon.events.apidestination.ResourceModel.TYPE_NAME, e);
}
logger.log(String.format("%s has successfully been read.", ResourceModel.TYPE_NAME));
return awsResponse;
}