UNPKG

@nestjs-aws/systems-manager

Version:

NestJS module for AWS Systems Manager (Parameter Store & Secrets Manager). Seamlessly integrate AWS SSM parameters and secrets into your NestJS applications with TypeScript support, automatic refresh, and hierarchical configuration management.

35 lines (34 loc) 1.49 kB
import { SystemsManagerParameters, SystemsManagerSecrets, ModuleOptions } from './interface'; import { Parameter } from '@aws-sdk/client-ssm'; import { ParameterStoreFetcherService, SecretsManagerFetcherService } from './services'; export declare class SystemsManagerService { private readonly config; private readonly parameterFetcher; private readonly secretsFetcher; private readonly logger; private _parameters; private _secrets; constructor(awsParameters: Parameter[], awsSecrets: Record<string, string>, config: ModuleOptions, parameterFetcher: ParameterStoreFetcherService, secretsFetcher: SecretsManagerFetcherService); private loadParameters; private loadSecrets; private extractParameterKey; getParameter(key: string): string; getSecret(key: string): string; get(key: string): string; getAsNumber(key: string): number; getOrDefault(key: string, defaultValue: string): string; getAsBoolean(key: string): boolean; getAsJSON<T>(key: string): T; hasParameter(key: string): boolean; hasSecret(key: string): boolean; has(key: string): boolean; getAllParameterKeys(): string[]; getAllSecretKeys(): string[]; getAllKeys(): string[]; getAllParameters(): SystemsManagerParameters; getAllSecrets(): SystemsManagerSecrets; getAll(): SystemsManagerParameters & SystemsManagerSecrets; refresh(): Promise<void>; refreshParameters(): Promise<void>; refreshSecrets(): Promise<void>; }