in aws-route53recoveryreadiness-resourceset/src/main/java/software/amazon/route53recoveryreadiness/resourceset/UpdateHandler.java [78:99]
private GetResourceSetResponse preExistenceCheck(
final GetResourceSetRequest awsRequest,
final ProxyClient<Route53RecoveryReadinessClient> proxyClient ) {
GetResourceSetResponse response;
try {
response = proxyClient.injectCredentialsAndInvokeV2(awsRequest, proxyClient.client()::getResourceSet);
} catch (final Route53RecoveryReadinessException e) {
if (e.statusCode() == 404) {
throw new CfnNotFoundException(ResourceModel.TYPE_NAME,
awsRequest.resourceSetName(), e);
} else
throw new CfnGeneralServiceException(awsRequest.resourceSetName(), e);
} catch (final AwsServiceException e) {
throw new CfnGeneralServiceException(awsRequest.resourceSetName(), e);
}
logger.log(String.format("%s has successfully been read.", ResourceModel.TYPE_NAME));
return response;
}