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
staticoptionalglobalConfig
Methods
get
Type parameters
- T: keyof ConfigurationOptions
- U: undefined | string | number | boolean | StorageClient | EventManager | Dictionary<any> | (radix) => string | (fractionDigits) => string | (fractionDigits) => string | (precision) => string | () => number | ({ (locales, options): string; (locales, options): string })
Parameters
key: T
optionaldefaultValue: U
Returns U
externalgetEventManager
Returns EventManager
set
Parameters
key: keyof ConfigurationOptions
optionalvalue: any
Returns void
externaluseEventManager
Parameters
externalevents: EventManager
Returns void
externaluseStorageClient
Parameters
externalclient: StorageClient
Returns void
staticexternalgetEventManager
Gets default EventManager instance.
Returns EventManager
staticgetGlobalConfig
Returns Configuration
staticexternalgetStorageClient
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
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
memoryMbytesAPIFY_MEMORY_MBYTESheadlessAPIFY_HEADLESSpersistStateIntervalMillisAPIFY_PERSIST_STATE_INTERVAL_MILLIS60e3tokenAPIFY_TOKENisAtHomeAPIFY_IS_AT_HOMEdefaultDatasetIdAPIFY_DEFAULT_DATASET_ID'default'defaultKeyValueStoreIdAPIFY_DEFAULT_KEY_VALUE_STORE_ID'default'defaultRequestQueueIdAPIFY_DEFAULT_REQUEST_QUEUE_ID'default'Advanced Configuration Options
actorEventsWsUrlAPIFY_ACTOR_EVENTS_WS_URLactorIdAPIFY_ACTOR_IDactorRunIdAPIFY_ACTOR_RUN_IDactorTaskIdAPIFY_ACTOR_TASK_IDapiBaseUrlAPIFY_API_BASE_URL'https://api.apify.com'containerPortAPIFY_CONTAINER_PORT4321containerUrlAPIFY_CONTAINER_URL'http://localhost:4321'inputKeyAPIFY_INPUT_KEY'INPUT'metamorphAfterSleepMillisAPIFY_METAMORPH_AFTER_SLEEP_MILLIS300e3proxyHostnameAPIFY_PROXY_HOSTNAME'proxy.apify.com'proxyPasswordAPIFY_PROXY_PASSWORDproxyPortAPIFY_PROXY_PORT8000proxyStatusUrlAPIFY_PROXY_STATUS_URL'http://proxy.apify.com'userIdAPIFY_USER_IDxvfbAPIFY_XVFBchromeExecutablePathAPIFY_CHROME_EXECUTABLE_PATHdefaultBrowserPathAPIFY_DEFAULT_BROWSER_PATH