@purista/aws-secret-store v2.0.5
PURISTA API / @purista/aws-secret-store / AWSSecretStore
Class: AWSSecretStore
Defined in: aws-secret-store/src/AWSSecretStore.impl.ts:32
The secret store adapter for AWS Secrets Manager. It will store, retrive, update or remove secrets in AWS Secrets Manager.
For performance reasons, and to reduce costs, the secret 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 secret values via config cacheTtl (in ms).
This will return the cached secret if available and if ttl is not exceeded. If a secret value exceeds the ttl, it does not automatically get removed from cache. It will be removed/overwritten on next get request.
Extends
Constructors
new AWSSecretStore()
new AWSSecretStore(
config
):AWSSecretStore
Defined in: aws-secret-store/src/AWSSecretStore.impl.ts:35
Parameters
config
cacheTtl?
number
Cache time to live in ms
client
SecretsManagerClientConfigType
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
SecretStoreBaseClass
.constructor
Properties
cache
cache:
SecretStoreCacheMap
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:20
Inherited from
client
client:
SecretsManagerClient
Defined in: aws-secret-store/src/AWSSecretStore.impl.ts:33
config
config:
object
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:18
cacheTtl?
optional
cacheTtl:number
Cache time to live in ms
client
client:
SecretsManagerClientConfigType
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/SecretStore/SecretStoreBaseClass.impl.d.ts:17
Inherited from
name
name:
string
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:19
Inherited from
Methods
destroy()
destroy():
Promise
<void
>
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:28
Returns
Promise
<void
>
Inherited from
getSecret()
getSecret<
SecretNames
>(...secretNames
):Promise
<ObjectWithKeysFromStringArray
<SecretNames
,undefined
|string
>>
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:23
Type Parameters
• SecretNames extends string
[]
Parameters
secretNames
...SecretNames
Returns
Promise
<ObjectWithKeysFromStringArray
<SecretNames
, undefined
| string
>>
Inherited from
SecretStoreBaseClass
.getSecret
getSecretImpl()
protected
getSecretImpl<SecretNames
>(...secretNames
):Promise
<ObjectWithKeysFromStringArray
<SecretNames
,undefined
|string
>>
Defined in: aws-secret-store/src/AWSSecretStore.impl.ts:40
Type Parameters
• SecretNames extends string
[]
Parameters
secretNames
...SecretNames
Returns
Promise
<ObjectWithKeysFromStringArray
<SecretNames
, undefined
| string
>>
Overrides
SecretStoreBaseClass
.getSecretImpl
removeSecret()
removeSecret(
secretName
):Promise
<void
>
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:25
Parameters
secretName
string
Returns
Promise
<void
>
Inherited from
SecretStoreBaseClass
.removeSecret
removeSecretImpl()
protected
removeSecretImpl(secretName
):Promise
<void
>
Defined in: aws-secret-store/src/AWSSecretStore.impl.ts:63
Parameters
secretName
string
Returns
Promise
<void
>
Overrides
SecretStoreBaseClass
.removeSecretImpl
setSecret()
setSecret(
secretName
,secretValue
):Promise
<void
>
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:27
Parameters
secretName
string
secretValue
string
Returns
Promise
<void
>
Inherited from
SecretStoreBaseClass
.setSecret
setSecretImpl()
protected
setSecretImpl(secretName
,secretValue
):Promise
<void
>
Defined in: aws-secret-store/src/AWSSecretStore.impl.ts:71
Parameters
secretName
string
secretValue
string
Returns
Promise
<void
>