in aws-licensemanager-license/src/main/java/software/amazon/licensemanager/license/DeleteHandler.java [71:90]
private DeleteLicenseResponse deleteResource(
final ResourceModel model,
final DeleteLicenseRequest deleteLicenseRequest,
final ProxyClient<LicenseManagerClient> proxyClient) {
DeleteLicenseResponse deleteLicenseResponse = null;
try {
deleteLicenseResponse = proxyClient.injectCredentialsAndInvokeV2(deleteLicenseRequest,
proxyClient.client()::deleteLicense);
} catch (InvalidParameterValueException | ValidationException e) {
logger.log("Resource deletion failed");
throw new CfnNotFoundException(model.getLicenseArn(), ResourceModel.TYPE_NAME);
} catch (final AwsServiceException e) {
logger.log("Resource deletion failed");
throw new CfnGeneralServiceException(ResourceModel.TYPE_NAME + e.getMessage(), e);
}
logger.log(String.format("%s successfully deleted.", ResourceModel.TYPE_NAME));
return deleteLicenseResponse;
}