-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
24 lines (17 loc) · 749 Bytes
/
test.js
File metadata and controls
24 lines (17 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const { SSMClient } = require('@aws-sdk/client-ssm');
const SsmParameterStore = require('./src');
async function main() {
const params = new SsmParameterStore(new SSMClient({ region: 'us-east-1' }), {
TestParameter: 'test_parameter',
TestNestedParameter: '/this/is/a/test/nested/parameter',
NonExistentParameter: 'doesntexist',
});
console.log(await params.get('NonExistentParameter'));
console.log(await params.get('TestNestedParameter'));
console.log(await params.get('TestNestedParameter', { ignoreCache: true }));
console.log(await params.getAll());
console.log(await params.getAll({ ignoreCache: true }));
console.log(await params.preload());
console.log(await params.get('UndeclaredParameter'));
}
main();