in aws-rds-globalcluster/src/main/java/software/amazon/rds/globalcluster/BaseHandlerStd.java [51:75]
protected abstract ProgressEvent<ResourceModel, CallbackContext> handleRequest(AmazonWebServicesClientProxy proxy,
ResourceHandlerRequest<ResourceModel> request,
CallbackContext callbackContext,
ProxyClient<RdsClient> proxyClient,
Logger logger);
// Global Cluster Stabilization
protected boolean isGlobalClusterStabilized(final ProxyClient<RdsClient> proxyClient,
final ResourceModel model) {
// describe status of a resource to make sure it's ready
try {
final List<GlobalCluster> globalClusters =
proxyClient.injectCredentialsAndInvokeV2(
Translator.describeGlobalClustersRequest(model),
proxyClient.client()::describeGlobalClusters).globalClusters();
if(globalClusters == null || globalClusters.size() == 0) {
return false;
}
return GlobalClusterStatus.Available.equalsString(globalClusters.get(0).status());
} catch (GlobalClusterNotFoundException e) {
return false;
} catch (Exception e) {
throw new CfnNotStabilizedException(MESSAGE_FORMAT_FAILED_TO_STABILIZE, model.getGlobalClusterIdentifier(), e);
}
}