Class: Lono::Template::Context::SsmFetcher
- Inherits:
-
Object
- Object
- Lono::Template::Context::SsmFetcher
- Extended by:
- Memoist
- Defined in:
- lib/lono/template/context/ssm_fetcher.rb
Instance Method Summary collapse
Instance Method Details
#fetch_ssm_value(name) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/lono/template/context/ssm_fetcher.rb', line 11 def fetch_ssm_value(name) resp = ssm.get_parameter(name: name, with_decryption: true) resp.parameter.value rescue Aws::SSM::Errors::ParameterNotFound 'SSM-PARAM-NOT-FOUND' end |
#get(name) ⇒ Object
7 8 9 |
# File 'lib/lono/template/context/ssm_fetcher.rb', line 7 def get(name) fetch_ssm_value(name) end |
#ssm ⇒ Object
18 19 20 |
# File 'lib/lono/template/context/ssm_fetcher.rb', line 18 def ssm Aws::SSM::Client.new end |