Sha256: 02c28b4e066ad4424a7866ab2921814bcf39b48c64148beb295757b3ec7a2c36

Contents?: true

Size: 901 Bytes

Versions: 15

Compression:

Stored size: 901 Bytes

Contents

module Fog
  module AWS
    module EC2
      class Real

        require 'fog/aws/parsers/ec2/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::EC2::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

15 entries across 15 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.28 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.27 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.26 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.25 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.24 lib/fog/aws/requests/ec2/stop_instances.rb
tecnh-fog-0.2.23.vpc lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.23 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.22 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.21 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.20 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.19 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.18 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.17 lib/fog/aws/requests/ec2/stop_instances.rb
fog-0.2.16 lib/fog/aws/requests/ec2/stop_instances.rb