BuildClient
Hierarchy
- ResourceClient
- BuildClient
Index
Properties
inheritedapifyClient
inheritedbaseUrl
inheritedhttpClient
optionalinheritedid
optionalinheritedparams
inheritedpublicBaseUrl
inheritedresourcePath
optionalinheritedsafeId
inheritedurl
Methods
abort
Aborts the Actor build.
Stops the build process immediately. The build will have an
ABORTEDstatus.Returns Promise<Build>
The updated Build object with
ABORTEDstatus
delete
Deletes the Actor build.
Returns Promise<void>
get
Gets the Actor build object from the Apify API.
Parameters
options: BuildClientGetOptions = {}
Get options
Returns Promise<undefined | Build>
The Build object, or
undefinedif it does not exist
getOpenApiDefinition
Retrieves the OpenAPI definition for the Actor build.
Returns Promise<OpenApiDefinition>
The OpenAPI definition object.
log
Returns a client for accessing the log of this Actor build.
Returns LogClient
A client for accessing the build's log
waitForFinish
Waits for the Actor build to finish and returns the finished Build object.
The promise resolves when the build reaches a terminal state (
SUCCEEDED,FAILED,ABORTED, orTIMED-OUT). IfwaitSecsis provided and the timeout is reached, the promise resolves with the unfinished Build object (status will beRUNNINGorREADY). The promise is NOT rejected based on build status.Unlike the
waitForFinishparameter in get, this method can wait indefinitely by polling the build status. It uses thewaitForFinishparameter internally (max 60s per call) and continuously polls until the build finishes or the timeout is reached.This is useful when you need to immediately start a run after a build finishes.
Parameters
options: BuildClientWaitForFinishOptions = {}
Wait options
Returns Promise<Build>
The Build object (finished or still building if timeout was reached)
Client for managing a specific Actor build.
Builds are created when an Actor is built from source code. This client provides methods to get build details, wait for the build to finish, abort it, and access its logs.
https://docs.apify.com/platform/actors/running/runs-and-builds#builds