in aws-amplify-domain/src/main/java/software/amazon/amplify/domain/DeleteHandler.java [50:77]
private boolean isStabilized(final AmazonWebServicesClientProxy proxy,
final ProxyClient<AmplifyClient> proxyClient,
final ResourceModel model,
final Logger logger) {
final String domainInfo = String.format("%s - %s", model.getAppId(), model.getDomainName());
try {
final GetDomainAssociationRequest getDomainAssociationRequest = GetDomainAssociationRequest.builder()
.appId(model.getAppId())
.domainName(model.getDomainName())
.build();
ClientWrapper.execute(
proxy,
getDomainAssociationRequest,
proxyClient.client()::getDomainAssociation,
ResourceModel.TYPE_NAME,
model.getArn(),
logger);
logger.log(String.format("%s DELETE stabilization still in progress", domainInfo));
return false;
} catch (final CfnNotFoundException e) {
logger.log(String.format("%s DELETE stabilization complete", domainInfo));
return true;
} catch (final AwsServiceException e) {
logger.log(String.format("%s DELETE stabilization failed: %s", domainInfo, e));
throw new CfnNotStabilizedException(ResourceModel.TYPE_NAME, model.getArn());
}
}