in aws-route53recoverycontrol-safetyrule/src/main/java/software/amazon/route53recoverycontrol/safetyrule/DeleteHandler.java [41:58]
private DeleteSafetyRuleResponse deleteSafetyRule(
DeleteSafetyRuleRequest request,
ProxyClient<Route53RecoveryControlConfigClient> proxyClient
) {
DeleteSafetyRuleResponse response = null;
try{
response = proxyClient.injectCredentialsAndInvokeV2(request, ClientBuilder.getClient()::deleteSafetyRule);
} catch (Route53RecoveryControlConfigException e) {
if (e.statusCode() == 404) {
throw new CfnNotFoundException(ResourceModel.TYPE_NAME, request.safetyRuleArn(), e);
}
} catch (AwsServiceException e) {
throw new CfnGeneralServiceException(ResourceModel.TYPE_NAME, e);
}
return response;
}