Class: ZAWS::External::AWSCLI::Commands::EC2::TerminateInstances
- Inherits:
-
Object
- Object
- ZAWS::External::AWSCLI::Commands::EC2::TerminateInstances
- Defined in:
- lib/zaws/external/awscli/commands/ec2/terminate_instances.rb
Instance Method Summary collapse
- #aws ⇒ Object
- #clear_settings ⇒ Object
- #get_command ⇒ Object
-
#initialize(shellout = nil, awscli = nil) ⇒ TerminateInstances
constructor
A new instance of TerminateInstances.
- #instance_id(id) ⇒ Object
Constructor Details
#initialize(shellout = nil, awscli = nil) ⇒ TerminateInstances
Returns a new instance of TerminateInstances.
7 8 9 10 11 |
# File 'lib/zaws/external/awscli/commands/ec2/terminate_instances.rb', line 7 def initialize(shellout=nil, awscli=nil) @shellout=shellout @awscli=awscli clear_settings end |
Instance Method Details
#aws ⇒ Object
13 14 15 16 |
# File 'lib/zaws/external/awscli/commands/ec2/terminate_instances.rb', line 13 def aws @aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self) @aws end |
#clear_settings ⇒ Object
18 19 20 21 |
# File 'lib/zaws/external/awscli/commands/ec2/terminate_instances.rb', line 18 def clear_settings @aws=nil @instance_id=nil end |
#get_command ⇒ Object
28 29 30 31 32 |
# File 'lib/zaws/external/awscli/commands/ec2/terminate_instances.rb', line 28 def get_command command = "ec2 terminate-instances" command = "#{command} --instance-ids #{@instance_id}" if @instance_id return command end |
#instance_id(id) ⇒ Object
23 24 25 26 |
# File 'lib/zaws/external/awscli/commands/ec2/terminate_instances.rb', line 23 def instance_id(id) @instance_id=id self end |