# ActorVersionCollectionClientAsync<!-- -->

Sub-client for the Actor version collection.

Provides methods to manage Actor versions, e.g. list or create them. Obtain an instance via an appropriate method on the `ActorClientAsync` class.

### Hierarchy

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

## Index[**](#Index)

### Methods

* [**\_\_init\_\_](https://docs.apify.com/api/client/python/api/client/python/reference/class/ActorVersionCollectionClientAsync.md#__init__)
* [**create](https://docs.apify.com/api/client/python/api/client/python/reference/class/ActorVersionCollectionClientAsync.md#create)
* [**iterate](https://docs.apify.com/api/client/python/api/client/python/reference/class/ActorVersionCollectionClientAsync.md#iterate)
* [**list](https://docs.apify.com/api/client/python/api/client/python/reference/class/ActorVersionCollectionClientAsync.md#list)

### Properties

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

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

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

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

- Overrides [ResourceClientAsync.\_\_init\_\_](https://docs.apify.com/api/client/python/api/client/python/reference/class/ResourceClientAsync.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: [HttpClientAsync](https://docs.apify.com/api/client/python/api/client/python/reference/class/HttpClientAsync.md)

    HTTP client for making requests.

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

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

  * ##### keyword-onlyclient\_registry: [ClientRegistryAsync](https://docs.apify.com/api/client/python/api/client/python/reference/class/ClientRegistryAsync.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

### [**](#create)create

* **async **create**(\*, version\_number, build\_tag, env\_vars, apply\_env\_vars\_to\_build, source\_type, source\_files, git\_repo\_url, tarball\_url, github\_gist\_url, timeout): [Version](https://docs.apify.com/api/client/python/api/client/python/reference/class/Version.md)

- Create a new Actor version.

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

  ***

  #### Parameters

  * ##### keyword-onlyversion\_number: str

    Major and minor version of the Actor (e.g. `1.0`).

  * ##### 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/api/client/python/reference/class/ActorEnvVarCollectionClient.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.

  * ##### keyword-onlysource\_type: [VersionSourceType](https://docs.apify.com/api/client/python/api/client/python/reference.md#VersionSourceType)

    What source type is the Actor version using.

  * ##### optionalkeyword-onlysource\_files: [list](https://docs.apify.com/api/client/python/api/client/python/reference/class/ActorEnvVarCollectionClient.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-onlytimeout: [Timeout](https://docs.apify.com/api/client/python/api/client/python/reference.md#Timeout) = <!-- -->'short'

    Timeout for the API HTTP request.

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

  The created Actor version.

### [**](#iterate)iterate

* **async **iterate**(\*, timeout): AsyncIterator\[[Version](https://docs.apify.com/api/client/python/api/client/python/reference/class/Version.md)]

- Iterate over the available Actor versions.

  The underlying API endpoint does not support pagination, so this method performs a single API call and yields the items from its response. If the endpoint returns more items than fit in one response (the API caps the page size), the rest are not returned. In practice this is rarely a concern — Actors are not expected to have more versions than the cap.

  <https://docs.apify.com/api/v2#/reference/actors/version-collection/get-list-of-versions>

  ***

  #### 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 AsyncIterator\[[Version](https://docs.apify.com/api/client/python/api/client/python/reference/class/Version.md)]

### [**](#list)list

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

- List the available Actor versions.

  <https://docs.apify.com/api/v2#/reference/actors/version-collection/get-list-of-versions>

  ***

  #### 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 [ListOfVersions](https://docs.apify.com/api/client/python/api/client/python/reference/class/ListOfVersions.md)

  The list of available Actor versions.

## 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.
