# ActorVersionClient<!-- -->

Sub-client for managing a specific Actor version.

Provides methods to manage a specific Actor version, e.g. get, update, or delete it. Obtain an instance via an appropriate method on the `ActorClient` class.

### Hierarchy

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

## Index[](#Index)

### Methods

* [\_\_init\_\_](https://docs.apify.com/api/client/python/reference/class/ActorVersionClient.md#__init__)
* [delete](https://docs.apify.com/api/client/python/reference/class/ActorVersionClient.md#delete)
* [env_var](https://docs.apify.com/api/client/python/reference/class/ActorVersionClient.md#env_var)
* [env_vars](https://docs.apify.com/api/client/python/reference/class/ActorVersionClient.md#env_vars)
* [get](https://docs.apify.com/api/client/python/reference/class/ActorVersionClient.md#get)
* [update](https://docs.apify.com/api/client/python/reference/class/ActorVersionClient.md#update)

### Properties

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

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

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

* **\_\_init\_\_**(\*, base_url, public_base_url, http_client, resource_path, client_registry, resource_id, params, api_base_url): None

- Overrides [ResourceClient.\_\_init\_\_](https://docs.apify.com/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/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/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: [QueryParams](https://docs.apify.com/api/client/python/reference.md#QueryParams) | None = <!-- -->None

    Optional default parameters for all requests.

  * ##### optionalkeyword-onlyapi_base_url: str | None = <!-- -->None

    Base URL of the API itself, for clients of top-level resources. Defaults to `base_url`.

  #### Returns None

### [](#delete)delete

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

- Delete the Actor version.

  <https://docs.apify.com/api/v2#/reference/actors/version-object/delete-version>

  ***

  #### Parameters

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

    Timeout for the API HTTP request.

  #### Returns None

### [](#env_var)env_var

* **env_var**(env_var_name): [ActorEnvVarClient](https://docs.apify.com/api/client/python/reference/class/ActorEnvVarClient.md)

- Retrieve the client for the specified environment variable of this Actor version.

  ***

  #### Parameters

  * ##### env_var_name: str

    The name of the environment variable for which to retrieve the resource client.

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

  The resource client for the specified Actor environment variable.

### [](#env_vars)env_vars

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

- Retrieve a client for the environment variables of this Actor version.

  ***

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

### [](#get)get

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

- Return information about the Actor version.

  <https://docs.apify.com/api/v2#/reference/actors/version-object/get-version>

  ***

  #### Parameters

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

    Timeout for the API HTTP request.

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

  The retrieved Actor version data.

### [](#update)update

* **update**(\*, build_tag, env_vars, apply_env_vars_to_build, source_type, source_files, git_repo_url, tarball_url, github_gist_url, actor_path, timeout): [Version](https://docs.apify.com/api/client/python/reference/class/Version.md)

- Update the Actor version with specified fields.

  <https://docs.apify.com/api/v2#/reference/actors/version-object/update-version>

  ***

  #### Parameters

  * ##### optionalkeyword-onlybuild_tag: str | None = <!-- -->None

    Tag that is automatically set to the latest successful build of the current version.

  * ##### optionalkeyword-onlyenv_vars: [list](https://docs.apify.com/api/client/python/reference/class/ActorCollectionClient.md#list)\[dict\[str, Any]] | None = <!-- -->None

    Environment variables that will be available to the Actor run process, and optionally also to the build process. See the API docs for their exact structure.

  * ##### optionalkeyword-onlyapply_env_vars_to_build: bool | None = <!-- -->None

    Whether the environment variables specified for the Actor run will also be set to the Actor build process.

  * ##### optionalkeyword-onlysource_type: [VersionSourceType](https://docs.apify.com/api/client/python/reference.md#VersionSourceType) | None = <!-- -->None

    What source type is the Actor version using.

  * ##### optionalkeyword-onlysource_files: [list](https://docs.apify.com/api/client/python/reference/class/ActorCollectionClient.md#list)\[dict\[str, Any]] | None = <!-- -->None

    Source code comprised of multiple files, each an item of the array. Required when `source_type` is `'SOURCE_FILES'`. See the API docs for the exact structure.

  * ##### optionalkeyword-onlygit_repo_url: str | None = <!-- -->None

    The URL of a Git repository from which the source code will be cloned. Required when `source_type` is `'GIT_REPO'`.

  * ##### optionalkeyword-onlytarball_url: str | None = <!-- -->None

    The URL of a tarball or a zip archive from which the source code will be downloaded. Required when `source_type` is `'TARBALL'`.

  * ##### optionalkeyword-onlygithub_gist_url: str | None = <!-- -->None

    The URL of a GitHub Gist from which the source will be downloaded. Required when `source_type` is `'GITHUB_GIST'`.

  * ##### optionalkeyword-onlyactor_path: str | None = <!-- -->None

    The Actor's directory inside the uploaded source, only for `'SOURCE_FILES'` and `'TARBALL'` versions. A relative path with `/` separators, such as `actors/my-actor`, of 1 to 255 characters, with no leading, trailing, or repeated `/` and no `.` or `..` segment. An update that sends `source_type`, `source_files`, or `tarball_url` without `actor_path` removes the stored path, so pass it again with every upload. The client doesn't send `None`, so `actor_path=None` alone keeps the path. To remove it without a new upload, pass the current `source_type` again.

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

    Timeout for the API HTTP request.

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

  The updated Actor version.

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

### [](#resource_id)resource_id

resource_id: str | None

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

Get the resource ID.
