# ActorEnvVarCollectionClientAsync<!-- -->

Sub-client for the Actor environment variable collection.

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

### Hierarchy

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

## Index[**](#Index)

### Methods

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

### Properties

* [**resource\_id](https://docs.apify.com/api/client/python/api/client/python/reference/class/ActorEnvVarCollectionClientAsync.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**(\*, is\_secret, name, value, timeout): [EnvVar](https://docs.apify.com/api/client/python/api/client/python/reference/class/EnvVar.md)

- Create a new Actor environment variable.

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

  ***

  #### Parameters

  * ##### optionalkeyword-onlyis\_secret: bool | None = <!-- -->None

    Whether the environment variable is secret or not.

  * ##### keyword-onlyname: str

    The name of the environment variable.

  * ##### keyword-onlyvalue: str

    The value of the environment variable.

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

    Timeout for the API HTTP request.

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

  The created Actor environment variable.

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

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

- Iterate over the available Actor environment variables.

  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 define more environment variables than the cap.

  <https://docs.apify.com/api/v2#/reference/actors/environment-variable-collection/get-list-of-environment-variables>

  ***

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

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

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

- List the available Actor environment variables.

  <https://docs.apify.com/api/v2#/reference/actors/environment-variable-collection/get-list-of-environment-variables>

  ***

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

  The list of available Actor environment variables.

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