Method: Fog::Compute::AWS::Real#stop_instances

Defined in:
lib/fog/compute/requests/aws/stop_instances.rb

#stop_instances(instance_id) ⇒ Object

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



20
21
22
23
24
25
26
27
# File 'lib/fog/compute/requests/aws/stop_instances.rb', line 20

def stop_instances(instance_id)
  params = Fog::AWS.indexed_param('InstanceId', instance_id)
  request({
    'Action'    => 'StopInstances',
    :idempotent => true,
    :parser     => Fog::Parsers::Compute::AWS::StartStopInstances.new
  }.merge!(params))
end