def _glue_job_response_to_job()

in awsglue/devutils.py [0:0]


    def _glue_job_response_to_job(self, response_job):
        job = Job()
        job.name = response_job['name']

        try:
            job.description = response_job['description']
        except KeyError:
            logging.warning('description is missing in job response for job %s' % job.name)

        try:
            job.defaultArguments = response_job['defaultArguments']
        except KeyError:
            logging.warning('defaultArguments is missing in job response for job %s' % job.name)

        try:
            job.logUri = response_job['logUri']
        except KeyError:
            logging.warning('logUri is missing in job response for job %s' % job.name)

        try:
            job.role = response_job['role']
        except KeyError:
            logging.warning('role is missing in job response for job %s' % job.name)

        try:
            execution_property_dict = response_job['executionProperty']
            job.executionProperty = ExecutionProperty(execution_property_dict['maxConcurrentRuns'])
        except KeyError:
            logging.warning('executionProperty is missing in job response for job %s' % job.name)

        try:
            command_dict = response_job['command']
            job.command = Command(command_dict['name'], command_dict['scriptLocation'])
        except KeyError:
            logging.warning('command is missing in job response for job %s' % job.name)

        try:
            connections_dict = response_job['connections']
            job.connections = Connections(connections_dict['connections'])
        except KeyError:
            logging.warning('connections is missing in job response for job %s' % job.name)

        try:
            job.maxRetries = response_job['maxRetries']
        except KeyError:
            logging.warning('maxRetries is missing in job response for job %s' % job.name)

        try:
            job.createdOn = response_job['createdOn']
        except KeyError:
            logging.warning('createdOn is missing in job response for job %s' % job.name)

        try:
            job.lastModifiedOn = response_job['lastModifiedOn']
        except KeyError:
            logging.warning('lastModifiedOn is missing in job response for job %s' % job.name)

        return job