    # File lib/fog/aws/requests/compute/terminate_instances.rb, line 40
            def terminate_instances(instance_id)
              response = Excon::Response.new
              instance_id = [*instance_id]
              if (self.data[:instances].keys & instance_id).length == instance_id.length
                response.body = {
                  'requestId'     => Fog::AWS::Mock.request_id,
                  'instancesSet'  => []
                }
                response.status = 200
                for id in instance_id
                  instance = self.data[:instances][id]
                  self.data[:deleted_at][id] = Time.now
                  code = case instance['instanceState']['name']
                  when 'pending'
                    0
                  when 'running'
                    16
                  when 'shutting-down'
                    32
                  when 'terminated'
                    48
                  when 'stopping'
                    64
                  when 'stopped'
                    80
                  end
                  state = { 'name' => 'shutting-down', 'code' => 32}
                  response.body['instancesSet'] << {
                    'instanceId'    => id,
                    'previousState' => instance['instanceState'],
                    'currentState'  => state
                  }
                  instance['instanceState'] = state
                end

                describe_addresses.body['addressesSet'].each do |address|
                  if instance_id.include?(address['instanceId'])
                    disassociate_address(address['publicIp'])
                  end
                end

                describe_volumes.body['volumeSet'].each do |volume|
                  if volume['attachmentSet'].first && instance_id.include?(volume['attachmentSet'].first['instanceId'])
                    detach_volume(volume['volumeId'])
                  end
                end

                response
              else
                raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_id}' does not exist")
              end
            end