in aws-licensemanager-license/src/main/java/software/amazon/licensemanager/license/UpdateHandler.java [65:85]
private CreateLicenseVersionResponse createLicenseVersion(
final ResourceModel model,
final CreateLicenseVersionRequest createLicenseVersionRequest,
final ProxyClient<LicenseManagerClient> proxyClient) {
CreateLicenseVersionResponse createLicenseVersionResponse = null;
try {
createLicenseVersionResponse = proxyClient.injectCredentialsAndInvokeV2(createLicenseVersionRequest,
proxyClient.client()::createLicenseVersion);
}
catch (InvalidParameterValueException | ValidationException e) {
logger.log("Resource update failed");
throw new CfnNotFoundException(model.getLicenseArn(), ResourceModel.TYPE_NAME);
}
catch (final AwsServiceException e) {
logger.log(String.format("Resource updation failed"));
throw new CfnGeneralServiceException(ResourceModel.TYPE_NAME + e.getMessage(), e);
}
logger.log(String.format("%s has successfully been updated.", ResourceModel.TYPE_NAME));
return createLicenseVersionResponse;
}