Class: Persey::Adapters::Ssm
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.config_exists?(path, opts: {}) ⇒ Boolean
25 26 27 28 |
# File 'lib/persey/adapters/ssm.rb', line 25 def config_exists?(path, opts: {}) ssm = ssm_client(opts) ssm.get_parameter(name: path, with_decryption: true).parameter.nil? == false end |
.load(path, _env, opts: {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/persey/adapters/ssm.rb', line 12 def load(path, _env, opts: {}) ssm = ssm_client(opts) param = ssm.get_parameter(name: path, with_decryption: true).parameter res = begin JSON.parse(param.value) rescue JSON::ParserError param.to_h end symbolize_keys(res) end |