private boolean isStabilized()

in aws-route53recoverycontrol-routingcontrol/src/main/java/software/amazon/route53recoverycontrol/routingcontrol/DeleteHandler.java [84:106]


    private boolean isStabilized(
            ProxyClient<Route53RecoveryControlConfigClient> proxyClient,
            ResourceModel model
    ) {
        String routingControlArn = model.getRoutingControlArn();

        DescribeRoutingControlResponse response;

        try{
            response = getRoutingControl(DescribeRoutingControlRequest.builder()
                    .routingControlArn(routingControlArn).build(), proxyClient);
        } catch (CfnNotFoundException e) {
            logger.log(String.format("%s has stabilized.", ResourceModel.TYPE_NAME));
            return true;
        }

        if (response != null && response.routingControl().statusAsString().equals("PENDING_DELETION")) {
            logger.log(String.format("%s has not yet stabilized.", ResourceModel.TYPE_NAME));
        } else {
            logger.log(String.format("%s was not successfully marked for deletion.", ResourceModel.TYPE_NAME));
        }
        return false;
    }