Sha256: 86b3f633c1bd0ccad8f1be2d0b62d0aa32d24e55a5bd3563f8e01afcc54e3601

Contents?: true

Size: 912 Bytes

Versions: 7

Compression:

Stored size: 912 Bytes

Contents

module Fog
  module AWS
    class Compute
      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
        def stop_instances(instance_id)
          params = AWS.indexed_param('InstanceId', instance_id)
          request({
            'Action'    => 'StopInstances',
            :idempotent => true,
            :parser     => Fog::Parsers::AWS::Compute::StartStopInstances.new
          }.merge!(params))
        end

      end

      class Mock

        def stop_instances(instance_id)
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fog-0.5.1 lib/fog/compute/requests/aws/stop_instances.rb
fog-0.5.0 lib/fog/compute/requests/aws/stop_instances.rb
phpfog-fog-0.4.1.3 lib/fog/compute/requests/aws/stop_instances.rb
phpfog-fog-0.4.1.2 lib/fog/compute/requests/aws/stop_instances.rb
phpfog-fog-0.4.1.1 lib/fog/compute/requests/aws/stop_instances.rb
phpfog-fog-0.4.1 lib/fog/compute/requests/aws/stop_instances.rb
fog-0.4.1 lib/fog/compute/requests/aws/stop_instances.rb