Configuration
Hierarchy
- Configuration
- Configuration
Index
Constructors
externalconstructor
Creates new
Configurationinstance with provided options. Env vars will have precedence over those.Parameters
externaloptionaloptions: ConfigurationOptions
Returns Configuration
Properties
externalreadonlyinheritedstorageManagers
staticoptionalglobalConfig
Methods
get
Parameters
key: T
optionaldefaultValue: U
Returns U
externalinheritedgetEventManager
Returns EventManager
set
Parameters
key: keyof ConfigurationOptions
optionalvalue: any
Returns void
externalinheriteduseEventManager
Parameters
externalevents: EventManager
Returns void
externalinheriteduseStorageClient
Parameters
externalclient: StorageClient
Returns void
staticexternalinheritedgetEventManager
Gets default EventManager instance.
Returns EventManager
staticgetGlobalConfig
Returns Configuration
staticexternalinheritedgetStorageClient
Gets default StorageClient instance.
Returns StorageClient
staticresetGlobalState
Resets global configuration instance. The default instance holds configuration based on env vars, if we want to change them, we need to first reset the global state. Used mainly for testing purposes.
Returns void
staticexternalinheritedset
Sets value for given option. Only affects the global
Configurationinstance, the value will not be propagated down to the env var. To reset a value, we can omit thevalueargument or passundefinedthere.Parameters
externalkey: keyof ConfigurationOptions
externaloptionalvalue: any
Returns void
staticexternalinheriteduseStorageClient
Parameters
externalclient: StorageClient
Returns void
Configurationis a value object holding the SDK configuration. We can use it in two ways:Actorclass, we can get the instance configuration viasdk.configSupported Configuration Options
memoryMbytesACTOR_MEMORY_MBYTESheadlessAPIFY_HEADLESSpersistStateIntervalMillisAPIFY_PERSIST_STATE_INTERVAL_MILLIS60e3tokenAPIFY_TOKENisAtHomeAPIFY_IS_AT_HOMEdefaultDatasetIdACTOR_DEFAULT_DATASET_ID'default'defaultKeyValueStoreIdACTOR_DEFAULT_KEY_VALUE_STORE_ID'default'defaultRequestQueueIdACTOR_DEFAULT_REQUEST_QUEUE_ID'default'Advanced Configuration Options
actorEventsWsUrlACTOR_EVENTS_WEBSOCKET_URLactorIdACTOR_IDactorRunIdACTOR_RUN_IDactorTaskIdACTOR_TASK_IDapiBaseUrlAPIFY_API_BASE_URL'https://api.apify.com'containerPortACTOR_WEB_SERVER_PORT4321containerUrlACTOR_WEB_SERVER_URL'http://localhost:4321'inputKeyACTOR_INPUT_KEY'INPUT'metamorphAfterSleepMillisAPIFY_METAMORPH_AFTER_SLEEP_MILLIS300e3metaOriginAPIFY_META_ORIGINproxyHostnameAPIFY_PROXY_HOSTNAME'proxy.apify.com'proxyPasswordAPIFY_PROXY_PASSWORDproxyPortAPIFY_PROXY_PORT8000proxyStatusUrlAPIFY_PROXY_STATUS_URL'http://proxy.apify.com'userIdAPIFY_USER_IDuserIsPayingAPIFY_USER_IS_PAYINGxvfbAPIFY_XVFBstandbyPortACTOR_STANDBY_PORT4321standbyUrlACTOR_STANDBY_URLchromeExecutablePathAPIFY_CHROME_EXECUTABLE_PATHdefaultBrowserPathAPIFY_DEFAULT_BROWSER_PATH