in aws-kendra-datasource/src/main/java/software/amazon/kendra/datasource/DeleteHandler.java [132:154]
private boolean stabilizedOnDelete(
final DeleteDataSourceRequest deleteDataSourceRequest,
final DeleteDataSourceResponse deleteDataSourceResponse,
final ProxyClient<KendraClient> proxyClient,
final ResourceModel model,
final CallbackContext callbackContext) {
DescribeDataSourceRequest describeDataSourceRequest = DescribeDataSourceRequest.builder()
.id(model.getId())
.indexId(model.getIndexId())
.build();
boolean stabilized;
try {
proxyClient.injectCredentialsAndInvokeV2(describeDataSourceRequest, proxyClient.client()::describeDataSource);
stabilized = false;
} catch (ResourceNotFoundException e) {
stabilized = true;
}
logger.log(String.format("%s [%s] deletion has stabilized: %s",
ResourceModel.TYPE_NAME, model.getPrimaryIdentifier(), stabilized));
return stabilized;
}