code: def save_profile_as(self):
          
          # noinspection PyCallByClass,PyTypeChecker
          file_name_dialog = QFileDialog(self)
          file_name_dialog.setAcceptMode(QFileDialog.AcceptSave)
          file_name_dialog.setNameFilter(self.tr('JSON files (*.json *.JSON)'))
          file_name_dialog.setDefaultSuffix('json')
          dir = os.path.join(QgsApplication.qgisSettingsDirPath(),
                             'inasafe', 'minimum_needs')
          file_name_dialog.setDirectory(expanduser(dir))
          if file_name_dialog.exec_():
              file_name = file_name_dialog.selectedFiles()[0]
          else:
              return
          file_name = basename(file_name)
          file_name = file_name.replace('.json', '')
          minimum_needs = {'resources': []}
          self.mark_current_profile_as_saved()
          for index in range(self.resources_list.count()):
              item = self.resources_list.item(index)
              minimum_needs['resources'].append(item.resource_full)
          minimum_needs['provenance'] = self.provenance.text()
          minimum_needs['profile'] = file_name
          self.minimum_needs.update_minimum_needs(minimum_needs)
          self.minimum_needs.save()
          self.minimum_needs.save_profile(file_name)
          if self.profile_combo.findText(file_name) == -1:
              self.profile_combo.addItem(file_name)
          self.profile_combo.setCurrentIndex(
              self.profile_combo.findText(file_name))
docs: Save the minimum needs under a new profile name.