private boolean doesStateMachineExist()

in statemachine/src/main/java/com/amazonaws/stepfunctions/cloudformation/statemachine/DeleteHandler.java [68:82]


    private boolean doesStateMachineExist(final ResourceModel model,
                                          final AmazonWebServicesClientProxy proxy,
                                          final AWSStepFunctions sfnClient) {
        DescribeStateMachineRequest describeStateMachineRequest = buildDescribeStateMachineRequestFromModel(model);
        try {
            proxy.injectCredentialsAndInvoke(describeStateMachineRequest, sfnClient::describeStateMachine);
            return true;
        } catch (Exception e) {
            if (isStateMachineNotFoundError(e)) {
                return false;
            }

            throw e;
        }
    }