# BuildClient<!-- -->

Sub-client for managing a specific Actor build.

Provides methods to manage a specific Actor build, e.g. get it, abort it, or wait for it to finish. Obtain an instance via an appropriate method on the `ApifyClient` class.

### Hierarchy

* [ResourceClient](https://docs.apify.com/api/client/python/api/client/python/reference/class/ResourceClient.md)
  * *BuildClient*

## Index[**](#Index)

### Methods

* [**\_\_init\_\_](https://docs.apify.com/api/client/python/api/client/python/reference/class/BuildClient.md#__init__)
* [**abort](https://docs.apify.com/api/client/python/api/client/python/reference/class/BuildClient.md#abort)
* [**delete](https://docs.apify.com/api/client/python/api/client/python/reference/class/BuildClient.md#delete)
* [**get](https://docs.apify.com/api/client/python/api/client/python/reference/class/BuildClient.md#get)
* [**get\_open\_api\_definition](https://docs.apify.com/api/client/python/api/client/python/reference/class/BuildClient.md#get_open_api_definition)
* [**log](https://docs.apify.com/api/client/python/api/client/python/reference/class/BuildClient.md#log)
* [**wait\_for\_finish](https://docs.apify.com/api/client/python/api/client/python/reference/class/BuildClient.md#wait_for_finish)

### Properties

* [**resource\_id](https://docs.apify.com/api/client/python/api/client/python/reference/class/BuildClient.md#resource_id)

## Methods<!-- -->[**](#Methods)

### [**](#__init__)\_\_init\_\_

* ****\_\_init\_\_**(\*, base\_url, public\_base\_url, http\_client, resource\_path, client\_registry, resource\_id, params): None

- Overrides [ResourceClient.\_\_init\_\_](https://docs.apify.com/api/client/python/api/client/python/reference/class/ResourceClient.md#__init__)

  Initialize the resource client.

  ***

  #### Parameters

  * ##### keyword-onlybase\_url: str

    API base URL.

  * ##### keyword-onlypublic\_base\_url: str

    Public CDN base URL.

  * ##### keyword-onlyhttp\_client: [HttpClient](https://docs.apify.com/api/client/python/api/client/python/reference/class/HttpClient.md)

    HTTP client for making requests.

  * ##### keyword-onlyresource\_path: str

    Resource endpoint path (e.g., 'actors', 'datasets').

  * ##### keyword-onlyclient\_registry: [ClientRegistry](https://docs.apify.com/api/client/python/api/client/python/reference/class/ClientRegistry.md)

    Bundle of client classes for dependency injection.

  * ##### optionalkeyword-onlyresource\_id: str | None = <!-- -->None

    Optional resource ID for single-resource clients.

  * ##### optionalkeyword-onlyparams: dict | None = <!-- -->None

    Optional default parameters for all requests.

  #### Returns None

### [**](#abort)abort

* ****abort**(\*, timeout): [Build](https://docs.apify.com/api/client/python/api/client/python/reference/class/Build.md)

- Abort the Actor build which is starting or currently running and return its details.

  <https://docs.apify.com/api/v2#/reference/actor-builds/abort-build/abort-build>

  ***

  #### Parameters

  * ##### optionalkeyword-onlytimeout: [Timeout](https://docs.apify.com/api/client/python/api/client/python/reference.md#Timeout) = <!-- -->'short'

    Timeout for the API HTTP request.

  #### Returns [Build](https://docs.apify.com/api/client/python/api/client/python/reference/class/Build.md)

  The data of the aborted Actor build.

### [**](#delete)delete

* ****delete**(\*, timeout): None

- Delete the build.

  <https://docs.apify.com/api/v2#/reference/actor-builds/delete-build/delete-build>

  ***

  #### Parameters

  * ##### optionalkeyword-onlytimeout: [Timeout](https://docs.apify.com/api/client/python/api/client/python/reference.md#Timeout) = <!-- -->'short'

    Timeout for the API HTTP request.

  #### Returns None

### [**](#get)get

* ****get**(\*, timeout): [Build](https://docs.apify.com/api/client/python/api/client/python/reference/class/Build.md) | None

- Return information about the Actor build.

  <https://docs.apify.com/api/v2#/reference/actor-builds/build-object/get-build>

  ***

  #### Parameters

  * ##### optionalkeyword-onlytimeout: [Timeout](https://docs.apify.com/api/client/python/api/client/python/reference.md#Timeout) = <!-- -->'short'

    Timeout for the API HTTP request.

  #### Returns [Build](https://docs.apify.com/api/client/python/api/client/python/reference/class/Build.md) | None

  The retrieved Actor build data.

### [**](#get_open_api_definition)get\_open\_api\_definition

* ****get\_open\_api\_definition**(\*, timeout): dict

- Return OpenAPI definition of the Actor's build.

  <https://docs.apify.com/api/v2/actor-build-openapi-json-get>

  ***

  #### Parameters

  * ##### optionalkeyword-onlytimeout: [Timeout](https://docs.apify.com/api/client/python/api/client/python/reference.md#Timeout) = <!-- -->'medium'

    Timeout for the API HTTP request.

  #### Returns dict

  OpenAPI definition of the Actor's build.

### [**](#log)log

* ****log**(): [LogClient](https://docs.apify.com/api/client/python/api/client/python/reference/class/LogClient.md)

- Get the client for the log of the Actor build.

  <https://docs.apify.com/api/v2/#/reference/actor-builds/build-log/get-log>

  ***

  #### Returns [LogClient](https://docs.apify.com/api/client/python/api/client/python/reference/class/LogClient.md)

  A client allowing access to the log of this Actor build.

### [**](#wait_for_finish)wait\_for\_finish

* ****wait\_for\_finish**(\*, wait\_duration, timeout): [Build](https://docs.apify.com/api/client/python/api/client/python/reference/class/Build.md) | None

- Wait synchronously until the build finishes or the server times out.

  ***

  #### Parameters

  * ##### optionalkeyword-onlywait\_duration: timedelta | None = <!-- -->None

    How long does the client wait for build to finish. None for indefinite.

  * ##### optionalkeyword-onlytimeout: [Timeout](https://docs.apify.com/api/client/python/api/client/python/reference.md#Timeout) = <!-- -->'no\_timeout'

    Timeout for the API HTTP request.

  #### Returns [Build](https://docs.apify.com/api/client/python/api/client/python/reference/class/Build.md) | None

  The Actor build data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED, TIMED\_OUT, ABORTED), then the build has not yet finished.

## Properties<!-- -->[**](#Properties)

### [**](#resource_id)resource\_id

**resource\_id: str | None

Inherited from [ResourceClientBase.resource\_id](https://docs.apify.com/api/client/python/api/client/python/reference/class/ResourceClientBase.md#resource_id)

Get the resource ID.
