1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/aws/requests/compute/stop_instances.rb

39 lines
912 B
Ruby
Raw Normal View History

2010-07-23 00:52:27 -04:00
module Fog
module AWS
2010-09-08 17:40:02 -04:00
class Compute
2010-07-23 00:52:27 -04:00
class Real
2010-09-08 17:40:02 -04:00
require 'fog/aws/parsers/compute/start_stop_instances'
2010-07-23 00:52:27 -04:00
# Stop specified instance
#
# ==== Parameters
# * instance_id<~Array> - Id of instance to start
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'requestId'<~String> - Id of request
# * TODO: fill in the blanks
def stop_instances(instance_id)
params = AWS.indexed_param('InstanceId', instance_id)
request({
'Action' => 'StopInstances',
:idempotent => true,
2010-09-08 17:40:02 -04:00
:parser => Fog::Parsers::AWS::Compute::StartStopInstances.new
2010-07-23 00:52:27 -04:00
}.merge!(params))
end
end
class Mock
def stop_instances(instance_id)
Fog::Mock.not_implemented
end
end
end
end
end