UNPKG

aws-parameter-cache

Version:

Parameter cache for AWS System Manager Parameter Store and AWS Secrets Manager

26 lines (25 loc) 1.07 kB
import { SSMClientConfig } from '@aws-sdk/client-ssm'; import { Refreshable } from './refreshable'; export interface ParameterProps { /** The name of the parameter you want to query. */ name: string; /** The parameter version. */ version?: string; /** Return decrypted values for secure string parameters. This flag is ignored for String and StringList parameter types. */ withDecryption?: boolean; /** The maximum amount of time in milliseconds a parameter will be considered fresh */ maxAge?: number; /** https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ssm/interfaces/ssmclientconfig.html */ ssmClientConfig?: SSMClientConfig; } export declare class Parameter extends Refreshable { readonly name: string; private readonly withDecryption; private readonly ssmClient; private cachedResult?; constructor(props: ParameterProps); get value(): Promise<string | string[]>; getValue(): Promise<string | string[]>; protected refreshParameter(): void; private getParameter; }