Class: Ecsl::Exec
- Inherits:
-
Object
- Object
- Ecsl::Exec
- Defined in:
- lib/ecsl/exec.rb
Instance Method Summary collapse
-
#initialize ⇒ Exec
constructor
A new instance of Exec.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Exec
Returns a new instance of Exec.
10 11 12 13 14 15 16 17 |
# File 'lib/ecsl/exec.rb', line 10 def initialize @profile = nil @filter = nil @region = nil @prompt = TTY::Prompt.new(interrupt: :exit) @ecs_client = nil end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/ecsl/exec.rb', line 19 def run cluster = select_cluster task, container = select_service_and_container(cluster) command = ["aws", "--profile", @profile, "--region", @region, "ecs", "execute-command", "--cluster", cluster, "--task", task, "--container", container, "--interactive", "--command", "/bin/bash"].join(" ") puts command end |