@dsmrt/axiom-aws-sdk
Version:
AWS sdk library for working with axiom cli
30 lines (26 loc) • 1.2 kB
text/typescript
import { SSMClient, Parameter } from '@aws-sdk/client-ssm';
declare const ssmClient: SSMClient;
declare const getParametersByPath: (path: string, parameters?: Parameter[], nextToken?: string, client?: SSMClient) => Promise<Parameter[]>;
declare const getParameters: (names: string[], client?: SSMClient) => Promise<Parameter[]>;
/**
* Extract a single parameter from an array of params (typically from params by path)
*
* @param name
* @param params
*/
declare const extractParamValue: (path: string, name: string, params: Parameter[]) => string;
type Params = {
[key: string]: Parameter;
};
declare class ParameterCollection<TParams extends Params> {
readonly path: string;
private readonly client?;
readonly map: Map<keyof TParams, Parameter>;
constructor(path: string, client?: SSMClient | undefined);
hasParam(param: keyof TParams): Promise<boolean>;
findParam(param: keyof TParams): Promise<Parameter | undefined>;
getParam(param: keyof TParams): Promise<Parameter>;
get(): Promise<Map<keyof TParams, Parameter>>;
private loadParameters;
}
export { ParameterCollection, type Params, extractParamValue, getParameters, getParametersByPath, ssmClient };