private boolean isStabilized()

in aws-route53recoverycontrol-routingcontrol/src/main/java/software/amazon/route53recoverycontrol/routingcontrol/CreateHandler.java [137:164]


    private boolean isStabilized(
            CreateRoutingControlResponse createResponse,
            ProxyClient<Route53RecoveryControlConfigClient> proxyClient,
            ResourceModel model,
            CallbackContext context
    ) {
        {
            String routingControlArn = createResponse.routingControl().routingControlArn();

            if (routingControlArn == null) return false;

            model.setRoutingControlArn(routingControlArn);

            DescribeRoutingControlResponse response;

            // if something goes wrong we want to bubble up the exception exception
            response = getRoutingControl(DescribeRoutingControlRequest.builder()
                    .routingControlArn(createResponse.routingControl().routingControlArn()).build(), proxyClient);

            if (response.routingControl().statusAsString().equals("DEPLOYED")) {
                logger.log(String.format("%s has stabilized.", ResourceModel.TYPE_NAME));
                return true;
            } else {
                logger.log(String.format("%s has not yet stabilized.", ResourceModel.TYPE_NAME));
                return false;
            }
        }
    }