ssm-params
Version:
Obtain from AWS SSM Parameter Store
21 lines (20 loc) • 753 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ssmToObjByPath = void 0;
const getAllParametersByPath_1 = require("./getAllParametersByPath");
const parametersToObj_1 = require("./parametersToObj");
async function ssmToObjByPath(options) {
if (typeof options === 'string') {
options = {
Path: options,
};
}
const data = await getAllParametersByPath_1.getAllParametersByPath({
Path: options.Path,
Recursive: options.Recursive || options.nestObject,
ParameterFilters: options.ParameterFilters,
WithDecryption: options.WithDecryption,
});
return parametersToObj_1.parametersToObj(options, data);
}
exports.ssmToObjByPath = ssmToObjByPath;