@purista/aws-config-store v2.0.5
PURISTA API / @purista/aws-config-store / AWSConfigStore
Class: AWSConfigStore
Defined in: aws-config-store/src/AWSConfigStore.impl.ts:27
The config store adapter for AWS System Manager. It will store, retrive, update or remove configs in AWS System Manager.
For performance reasons, and to reduce costs, the config values are cached in memory after first fetch.
You can disable the whole caching via config by setting enableCache to false. If the cache is enabled, you can set the ttl for cached config values via config cacheTtl (in ms).
This will return the cached config if available and if ttl is not exceeded. If a config value exceeds the ttl, it does not automatically get removed from cache. It will be removed/overwritten on next get request.
Extends
Constructors
new AWSConfigStore()
new AWSConfigStore(
config
):AWSConfigStore
Defined in: aws-config-store/src/AWSConfigStore.impl.ts:30
Parameters
config
cacheTtl?
number
Cache time to live in ms
client
SSMClientConfig
AWS client options
enableCache?
boolean
Enable cache
enableGet?
boolean
Enable generally get method
enableRemove?
boolean
Enable generally remove method
enableSet?
boolean
Enable generally set method
logger?
A logger instance
logLevel?
A log level for new logger if logger is not set
Returns
Overrides
ConfigStoreBaseClass
.constructor
Properties
cache
cache:
ConfigStoreCacheMap
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:20
Inherited from
client
client:
SSMClient
Defined in: aws-config-store/src/AWSConfigStore.impl.ts:28
config
config:
object
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:18
cacheTtl?
optional
cacheTtl:number
Cache time to live in ms
client
client:
SSMClientConfig
AWS client options
enableCache?
optional
enableCache:boolean
Enable cache
enableGet?
optional
enableGet:boolean
Enable generally get method
enableRemove?
optional
enableRemove:boolean
Enable generally remove method
enableSet?
optional
enableSet:boolean
Enable generally set method
logger?
optional
logger:Logger
A logger instance
logLevel?
optional
logLevel:LogLevelName
A log level for new logger if logger is not set
Inherited from
logger
logger:
Logger
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:17
Inherited from
name
name:
string
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:19
Inherited from
Methods
destroy()
destroy():
Promise
<void
>
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:70
Returns
Promise
<void
>
Inherited from
getConfig()
getConfig<
ConfigNames
>(...configNames
):Promise
<ObjectWithKeysFromStringArray
<ConfigNames
>>
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:37
Returns the values for given config properties. This function SHOULD NOT be overwritten by store implementation. For implementation overwrite protected getConfigImpl
Type Parameters
• ConfigNames extends string
[]
Parameters
configNames
...ConfigNames
Returns
Promise
<ObjectWithKeysFromStringArray
<ConfigNames
>>
an object of
Inherited from
ConfigStoreBaseClass
.getConfig
getConfigImpl()
protected
getConfigImpl<ConfigNames
>(...configNames
):Promise
<ObjectWithKeysFromStringArray
<ConfigNames
>>
Defined in: aws-config-store/src/AWSConfigStore.impl.ts:35
This method must be overwritten by actual store implementation.
Type Parameters
• ConfigNames extends string
[]
Parameters
configNames
...ConfigNames
list of config items
Returns
Promise
<ObjectWithKeysFromStringArray
<ConfigNames
>>
an object of
Overrides
ConfigStoreBaseClass
.getConfigImpl
removeConfig()
removeConfig(
configName
):Promise
<void
>
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:52
Removes the config item given by config name. This function SHOULD NOT be overwritten by store implementation. For implementation overwrite protected removeConfigImpl
Parameters
configName
string
Returns
Promise
<void
>
Inherited from
ConfigStoreBaseClass
.removeConfig
removeConfigImpl()
protected
removeConfigImpl(configName
):Promise
<void
>
Defined in: aws-config-store/src/AWSConfigStore.impl.ts:58
This method must be overwritten by actual store implementation.
Parameters
configName
string
Returns
Promise
<void
>
Overrides
ConfigStoreBaseClass
.removeConfigImpl
setConfig()
setConfig(
configName
,configValue
):Promise
<void
>
Defined in: core/dist/commonjs/core/ConfigStore/ConfigStoreBaseClass.impl.d.ts:69
Sets a config value This function SHOULD NOT be overwritten by store implementation. For implementation overwrite protected setConfigImpl
Parameters
configName
string
configValue
unknown
Returns
Promise
<void
>
Inherited from
ConfigStoreBaseClass
.setConfig
setConfigImpl()
protected
setConfigImpl(configName
,configValue
):Promise
<void
>
Defined in: aws-config-store/src/AWSConfigStore.impl.ts:66
This method must be overwritten by actual store implementation.
Parameters
configName
string
configValue
string
Returns
Promise
<void
>