1.6.0
Create a local string parameter.
Parameter
:
The parameter instance.
Create an env string parameter. The parameter name and alias will be set equal.
(string)
Parameter name and alias.
(string?)
Fallback value if parameter is not found.
Parameter
:
The parameter instance.
Create an AWS SSM string parameter.
Parameter
:
The parameter instance.
Create an AWS Secrets Manager string parameter.
Parameter
:
The parameter instance.
Create an AWS Secrets Manager JSON parameter.
Parameter
:
The parameter instance.
Create an AWS SSM non-negative integer parameter.
Parameter
:
The parameter instance.
Create a local non-negative integer parameter.
Parameter
:
The parameter instance.
Get the configuration. All additional named parameters are passed to the initProvider method of each parameter provider instance.
(Object
= {}
)
Name | Description |
---|---|
parameters.parameters Object
(default {} )
|
Parameters to fetch. |
parameters.aliases Object
(default {} )
|
Parameter key aliases. |
parameters.cache Object
(default <cache> )
|
In-memory cache-manager cache. In order to cache values across multiple invocations, a cache must be passed in from the outer scope. |
parameters.log Object
(default <logger> )
|
Pino compatible logger. |
Promise<Object>
:
The config.
Parameter model.
(Object)
Name | Description |
---|---|
parameters.name string
|
Name for the parameter. |
parameters.alias string
|
Alias for the parameter. |
parameters.fallback string?
|
Fallback value if parameter value is null, undefined, or not found. |
parameters.Provider string
|
Constructor for the underlying provider. |
parameters.validator Function
(default <always-valid> )
|
Boolean function that validates the parsed parameter. |
parameters.parser Function
(default <identity> )
|
Function to parse the parameter. |
parameters.isSensitive Boolean
(default false )
|
If the parameter value is sensitive. |
(string)
: Name of the parameter.
(string)
: Alias of the parameter.
(string)
: Name of the provider.
Get the parameter value.
(string)
Key to lookup the parameter from the provider.
Promise<any>
:
Parameter value.
Initialize the provider. Passes all arguments to the provider constructor. Must be called before get.
Parameter validation error.
Extends Error
(string)
Parameter key that failed validation.
(any)
Value that failed validation.
(string)
: Parameter key that failed validation.
(any)
: Value that failed validation.
Parameter parsing error.
Extends Error
(string)
Parameter key that failed parsing.
(any)
Value that failed parsing.
(Error)
Parse error.
Env provider.
Local provider.
AWS Secrets Manager provider.
AWS SSM provider.