RunClientAsync
Hierarchy
- ActorJobBaseClientAsync- RunClientAsync
 
Index
Methods
__init__
- Initialize a new instance. - Parameters- keyword-onlybase_url: str- Base URL of the API server. 
- keyword-onlyroot_client: ApifyClientAsync- The ApifyClientAsync instance under which this resource client exists. 
- keyword-onlyhttp_client: HTTPClientAsync- The HTTPClientAsync instance to be used in this client. 
- optionalkeyword-onlyresource_id: str | None = None- ID of the manipulated resource, in case of a single-resource client. 
- keyword-onlyresource_path: str- Path to the resource's endpoint on the API server. 
- optionalkeyword-onlyparams: dict | None = None- Parameters to include in all requests from this client. 
 - Returns None
abort
- Abort the Actor run which is starting or currently running and return its details. - https://docs.apify.com/api/v2#/reference/actor-runs/abort-run/abort-run - Parameters- optionalkeyword-onlygracefully: bool | None = None- If True, the Actor run will abort gracefully. It will send - abortingand- persistStatesevents into the run and force-stop the run after 30 seconds. It is helpful in cases where you plan to resurrect the run later.
 - Returns dict
charge
- Charge for an event of a Pay-Per-Event Actor run. - https://docs.apify.com/api/v2#/reference/actor-runs/charge-events-in-run - Parameters- event_name: str
- optionalcount: int | None = None
- optionalidempotency_key: str | None = None
 - Returns None
dataset
- Get the client for the default dataset of the Actor run. - https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages - Returns DatasetClientAsync
delete
- Returns None
get
- Return information about the Actor run. - https://docs.apify.com/api/v2#/reference/actor-runs/run-object/get-run - Returns dict | None
get_status_message_watcher
- Get - StatusMessageWatcherinstance that can be used to redirect status and status messages to logs.- StatusMessageWatchercan be explicitly started and stopped or used as a context manager.- Parameters- optionalto_logger: logging.Logger | None = None- Loggerused for logging the status and status messages. If not provided, a new logger is created.
- optionalcheck_period: timedelta = timedelta(seconds=1)- The period with which the status message will be polled. 
 - Returns StatusMessageWatcherAsync
get_streamed_log
- Get - StreamedLoginstance that can be used to redirect logs.- StreamedLogcan be explicitly started and stopped or used as a context manager.- Parameters- optionalto_logger: logging.Logger | None = None- Loggerused for logging the redirected messages. If not provided, a new logger is created
- optionalkeyword-onlyfrom_start: bool = True- If - True, all logs from the start of the actor run will be redirected. If- False, only newly arrived logs will be redirected. This can be useful for redirecting only a small portion of relevant logs for long-running actors in stand-by.
 - Returns StreamedLogAsync
key_value_store
- Get the client for the default key-value store of the Actor run. - https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages - Returns KeyValueStoreClientAsync
log
- Get the client for the log of the Actor run. - https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages - Returns LogClientAsync
metamorph
- Transform an Actor run into a run of another Actor with a new input. - https://docs.apify.com/api/v2#/reference/actor-runs/metamorph-run/metamorph-run - Parameters- keyword-onlytarget_actor_id: str- ID of the target Actor that the run should be transformed into. 
- optionalkeyword-onlytarget_actor_build: str | None = None- The build of the target Actor. It can be either a build tag or build number. By default, the run uses the build specified in the default run configuration for the target Actor (typically the latest build). 
- optionalkeyword-onlyrun_input: Any = None- The input to pass to the new run. 
- optionalkeyword-onlycontent_type: str | None = None- The content type of the input. 
 - Returns dict
reboot
- Reboot an Actor run. Only runs that are running, i.e. runs with status RUNNING can be rebooted. - https://docs.apify.com/api/v2#/reference/actor-runs/reboot-run/reboot-run - Returns dict
request_queue
- Get the client for the default request queue of the Actor run. - https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages - Returns RequestQueueClientAsync
resurrect
- Resurrect a finished Actor run. - Only finished runs, i.e. runs with status FINISHED, FAILED, ABORTED and TIMED-OUT can be resurrected. Run status will be updated to RUNNING and its container will be restarted with the same default storages. - https://docs.apify.com/api/v2#/reference/actor-runs/resurrect-run/resurrect-run - Parameters- optionalkeyword-onlybuild: str | None = None- Which Actor build the resurrected run should use. It can be either a build tag or build number. By default, the resurrected run uses the same build as before. 
- optionalkeyword-onlymemory_mbytes: int | None = None- New memory limit for the resurrected run, in megabytes. By default, the resurrected run uses the same memory limit as before. 
- optionalkeyword-onlytimeout_secs: int | None = None- New timeout for the resurrected run, in seconds. By default, the resurrected run uses the same timeout as before. 
- optionalkeyword-onlymax_items: int | None = None- Maximum number of items that the resurrected pay-per-result run will return. By default, the resurrected run uses the same limit as before. Limit can be only increased. 
- optionalkeyword-onlymax_total_charge_usd: Decimal | None = None- Maximum cost for the resurrected pay-per-event run in USD. By default, the resurrected run uses the same limit as before. Limit can be only increased. 
- optionalkeyword-onlyrestart_on_error: bool | None = None- Determines whether the resurrected run will be restarted if it fails. By default, the resurrected run uses the same setting as before. 
 - Returns dict
update
- Update the run with the specified fields. - https://docs.apify.com/api/v2#/reference/actor-runs/run-object/update-run - Parameters- optionalkeyword-onlystatus_message: str | None = None- The new status message for the run. 
- optionalkeyword-onlyis_status_message_terminal: bool | None = None- Set this flag to True if this is the final status message of the Actor run. 
- optionalkeyword-onlygeneral_access: RunGeneralAccess | None = None- Determines how others can access the run and its storages. 
 - Returns dict
wait_for_finish
- Wait synchronously until the run finishes or the server times out. - Parameters- optionalkeyword-onlywait_secs: int | None = None- How long does the client wait for run to finish. None for indefinite. 
 - Returns dict | None
Async sub-client for manipulating a single Actor run.