Class: Stackit::ManagedStackService

Inherits:
Object
  • Object
show all
Defined in:
lib/stackit/stack/managed_stack_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ManagedStackService

Returns a new instance of ManagedStackService.



7
8
9
# File 'lib/stackit/stack/managed_stack_service.rb', line 7

def initialize(options)
  self.options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/stackit/stack/managed_stack_service.rb', line 5

def options
  @options
end

Instance Method Details

#create!Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/stackit/stack/managed_stack_service.rb', line 11

def create!
  Stackit::ManagedStack.new(
    template: template,
    stack_name: stack_name,
    stack_policy: options[:stack_policy],
    depends: options[:depends],
    parameters_file: parameters_file,
    parameter_map: parameter_mappings,
    wait: options[:wait],
    force: options[:force],
    dry_run: options[:dry_run],
    debug: !!options[:debug]
  ).create!
end

#delete!Object



42
43
44
45
46
# File 'lib/stackit/stack/managed_stack_service.rb', line 42

def delete!
  Stackit::ManagedStack.new(
    stack_name: stack_name
  ).delete!
end

#update!Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/stackit/stack/managed_stack_service.rb', line 26

def update!
  ManagedStack.new(
    template: template,
    stack_name: stack_name,
    stack_policy: options[:stack_policy],
    stack_policy_during_update: options[:stack_policy_during_update],
    depends: options[:depends],
    parameters_file: parameters_file,
    parameter_map: parameter_mappings,
    wait: options[:wait],
    force: options[:force],
    dry_run: options[:dry_run],
    debug: !!options[:debug]
  ).update!
end