Sha256: ba2442f0696d4b1286dc4664da4e126dfe87a729a312d5f9a8cb40ab2987c462
Contents?: true
Size: 1009 Bytes
Versions: 3
Compression:
Stored size: 1009 Bytes
Contents
module Fog module Compute class AWS class Real require 'fog/compute/parsers/aws/start_stop_instances' # 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 # # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-StopInstances.html] def stop_instances(instance_id, force = false) params = Fog::AWS.indexed_param('InstanceId', instance_id) params.merge!('Force' => 'true') if force request({ 'Action' => 'StopInstances', :idempotent => true, :parser => Fog::Parsers::Compute::AWS::StartStopInstances.new }.merge!(params)) end end end end end
Version data entries
3 entries across 3 versions & 2 rubygems