Class: SsmUtils::PutParamsCommand
- Inherits:
-
Object
- Object
- SsmUtils::PutParamsCommand
- Defined in:
- lib/ssm_utils/put_params_command.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(options) ⇒ PutParamsCommand
constructor
A new instance of PutParamsCommand.
Constructor Details
#initialize(options) ⇒ PutParamsCommand
Returns a new instance of PutParamsCommand.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ssm_utils/put_params_command.rb', line 7 def initialize() = { overwrite: false, retry_limit: 3 }.merge() raise ArgumentError.new("No input file") unless .key? :in_file @overwrite = [:overwrite] @retry_limit = [:retry_limit] @in_file = [:in_file] end |
Instance Method Details
#execute ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/ssm_utils/put_params_command.rb', line 20 def execute parameters = YAML.load_file(@in_file) SsmWriterDriver.new( parameters: parameters, overwrite: @overwrite, retry_limit: @retry_limit ).write_parameters end |