Class: ZAWS::AWSCLI::Commands::EC2::StopInstances
- Inherits:
-
Object
- Object
- ZAWS::AWSCLI::Commands::EC2::StopInstances
- Defined in:
- lib/zaws/external/awscli/commands/ec2/stop_instances.rb
Instance Method Summary collapse
- #execute(instanceid, region, textout = nil, verbose = nil) ⇒ Object
-
#initialize(shellout, awscli) ⇒ StopInstances
constructor
A new instance of StopInstances.
Constructor Details
#initialize(shellout, awscli) ⇒ StopInstances
Returns a new instance of StopInstances.
7 8 9 10 |
# File 'lib/zaws/external/awscli/commands/ec2/stop_instances.rb', line 7 def initialize(shellout, awscli) @shellout=shellout @awscli=awscli end |
Instance Method Details
#execute(instanceid, region, textout = nil, verbose = nil) ⇒ Object
12 13 14 15 |
# File 'lib/zaws/external/awscli/commands/ec2/stop_instances.rb', line 12 def execute(instanceid, region, textout=nil, verbose=nil) comline="aws --output json --region #{region} ec2 stop-instances --instance-ids #{instanceid}" @shellout.cli(comline, verbose) end |