in aws-licensemanager-license/src/main/java/software/amazon/licensemanager/license/CreateHandler.java [109:129]
private boolean stabilizedOnCreate(
final ResourceModel model,
final CreateLicenseResponse awsResponse,
final ProxyClient<LicenseManagerClient> proxyClient) {
try {
model.setLicenseArn(awsResponse.licenseArn());
final GetLicenseResponse response = proxyClient.injectCredentialsAndInvokeV2(
Translator.getLicenseRequest(model), proxyClient.client()::getLicense);
if(response.license() != null)
{
return true;
}
return false;
} catch (final AccessDeniedException e) {
logger.log(e.getMessage());
throw new CfnAccessDeniedException(ResourceModel.TYPE_NAME, e);
} catch (final InvalidParameterValueException e) {
logger.log(e.getMessage());
throw new CfnInvalidRequestException(ResourceModel.TYPE_NAME, e);
}
}