    # File lib/fog/aws/requests/compute/run_instances.rb, line 90
            def run_instances(image_id, min_count, max_count, options = {})
              if block_device_mapping = options.delete('BlockDeviceMapping')
                block_device_mapping.each_with_index do |mapping, index|
                  for key, value in mapping
                    options.merge!({ format("BlockDeviceMapping.%d.#{key}", index) => value })
                  end
                end
              end
              if security_groups = options.delete('SecurityGroup')
                options.merge!(Fog::AWS.indexed_param('SecurityGroup', [*security_groups]))
              end
              if security_group_ids = options.delete('SecurityGroupId')
                options.merge!(Fog::AWS.indexed_param('SecurityGroupId', [*security_group_ids]))
              end
              if options['UserData']
                options['UserData'] = Base64.encode64(options['UserData'])
              end

              idempotent = !(options['ClientToken'].nil? || options['ClientToken'].empty?)

              request({
                'Action'    => 'RunInstances',
                'ImageId'   => image_id,
                'MinCount'  => min_count,
                'MaxCount'  => max_count,
                :idempotent => idempotent,
                :parser     => Fog::Parsers::Compute::AWS::RunInstances.new
              }.merge!(options))
            end