Class: Ufo::CLI::Cancel

Inherits:
Base
  • Object
show all
Defined in:
lib/ufo/cli/cancel.rb

Instance Attribute Summary

Attributes inherited from Base

#task_definition

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Utils::Sure

#sure?

Methods included from Utils::Pretty

#pretty_home, #pretty_path, #pretty_time

Methods included from Utils::Logging

#logger

Methods included from Ufo::Concerns

#build, #deploy, #info, #ps

Methods included from Ufo::Concerns::Names

#names

Methods included from AwsServices

#acm, #applicationautoscaling, #aws_options, #cfn, #cloudwatchlogs, #ec2, #ecr, #ecs, #elb, #s3, #ssm_client, #waf_client

Methods included from AwsServices::Concerns

#find_stack, #find_stack_resources, #stack_resources, #status, #task_definition_arns

Constructor Details

This class inherits a constructor from Ufo::CLI::Base

Instance Method Details

#are_you_sure?Boolean

Returns:

  • (Boolean)


10
11
12
13
14
15
16
# File 'lib/ufo/cli/cancel.rb', line 10

def are_you_sure?
  if @options[:yes]
    logger.info "Canceling the #{@stack_name.color(:green)} stack"
  else
    sure?("You are about to cancel the #{@stack_name.color(:green)} stack")
  end
end

#runObject



3
4
5
6
7
8
# File 'lib/ufo/cli/cancel.rb', line 3

def run
  are_you_sure?
  stack = Ufo::Cfn::Stack.new(@options)
  stack.cancel
  stack.status.wait
end