def _get_run_results(self, run_id, request_type="plan", timeout_count=120):
        """
        Wait for plan/apply results, else timeout

        :param run_id: ID for the run
        :return: Returns object of the results.
        """

        if request_type is not "plan" and request_type is not "apply":
            raise KeyError("request_type must be Plan or Apply")

        for x in range(0, timeout_count):

            request = self.client.get(path="/runs/" + run_id).json()
            if request['data']['attributes']['status'] is not "planning" and \
                            request['data']['attributes']['status'] is not "applying":
                return request['data']

            print("Job Status: " + request_type + "ing | " + str(x * 10) + " seconds")
            time.sleep(10)

        raise TimeoutError("Plan took too long to resolve")
def _get_run_results ( self , run_id , request_type = "plan" , timeout_count = 120 ) : if request_type is not "plan" and request_type is not "apply" : raise KeyError ( "request_type must be Plan or Apply" ) for x in range ( 0 , timeout_count ) : request = self . client . get ( path = "/runs/" + run_id ) . json ( ) if request [ 'data' ] [ 'attributes' ] [ 'status' ] is not "planning" and request [ 'data' ] [ 'attributes' ] [ 'status' ] is not "applying" : return request [ 'data' ] print ( "Job Status: " + request_type + "ing | " + str ( x * 10 ) + " seconds" ) time . sleep ( 10 ) raise TimeoutError ( "Plan took too long to resolve" )
Wait for plan/apply results, else timeout

        :param run_id: ID for the run
        :return: Returns object of the results.