Classes · @purista/aws-config-store

AWSConfigStore

Config store backed by AWS Systems Manager Parameter Store.

Signature

AWSConfigStore.ts typescript
class AWSConfigStore

Examples

example-1.ts typescript
const store = new AWSConfigStore({
  client: { region: 'eu-central-1' },
  cacheTtl: 60_000,
})

await store.setConfig('/tenants/acme/prod/app/theme', 'dark')
const config = await store.getConfig('/tenants/acme/prod/app/theme')

Constructors

1 entry

constructor

Constructor

Source
constructor.ts typescript
new constructor(config: { cacheTtl: number; client: SSMClientConfig; enableCache: boolean; enableGet: boolean; enableRemove: boolean; enableSet: boolean; ... })

Creates an AWS Systems Manager config store.

Properties

5 entries

cache

Property

cache.ts typescript
cache: ConfigStoreCacheMap

Optional local cache used by store implementations that opt in.

client

Property

Source
client.ts typescript
client: SSMClient

AWS SDK client used for SSM requests.

config

Property

config.ts typescript
config: { cacheTtl: number; client: SSMClientConfig; enableCache: boolean; enableGet: boolean; enableRemove: boolean; enableSet: boolean; ... }

Store configuration including operation toggles and cache settings.

logger

Property

logger.ts typescript
logger: Logger

Child logger scoped to the store name.

name

Property

name.ts typescript
name: string

Store name used in logs and diagnostics.

Methods

7 entries

destroy

Method

destroy.ts typescript
destroy(): Promise<void>

Shutdown hook for store adapters.

getConfig

Method

getConfig.ts typescript
getConfig<ConfigNames>(...configNames: ConfigNames): Promise<ObjectWithKeysFromStringArray<ConfigNames>>

Returns the values for given config properties.

getConfigImpl

Method

Source
getConfigImpl.ts typescript
getConfigImpl<ConfigNames>(...configNames: ConfigNames): Promise<ObjectWithKeysFromStringArray<ConfigNames>>

This method must be overwritten by actual store implementation.

removeConfig

Method

removeConfig.ts typescript
removeConfig(configName: string): Promise<void>

Removes the config item given by config name.

removeConfigImpl

Method

Source
removeConfigImpl.ts typescript
removeConfigImpl(configName: string): Promise<void>

This method must be overwritten by actual store implementation.

setConfig

Method

setConfig.ts typescript
setConfig(configName: string, configValue: unknown): Promise<void>

Sets a config value.

setConfigImpl

Method

Source
setConfigImpl.ts typescript
setConfigImpl(configName: string, configValue: string): Promise<void>

This method must be overwritten by actual store implementation.