The example shows how you can pause and resume the deferred import process by using the API. The example is based on the vc_import_history_sample.py sample.
For a complete and up-to-date version of the sample code, see the vSphere Automation SDK Python samples at GitHub.
... self.service_manager = ServiceManager(args.server, args.username, args.password, args.skipverification) self.service_manager.connect() ... # Using REST API service import_history = ImportHistory(self.service_manager.stub_config) ... # Change the status - either pause or resume it start_status = get_defer_history_import_status(import_history) if start_status == Status.RUNNING: print('Pausing Defer History Data Import.') import_history.pause() ... elif start_status == Status.PAUSED: print('Resuming Defer History Data Import.') import_history.resume() ...