class_docstr: Provides convenience methods for accessing and modifying the rules table.
class_docstr_tok: ["Provides","convenience","methods","for","accessing","and","modifying","the","rules","table","."]
docstr: Add any new local rules (renamed rules included) to the remote database
docstr_tok: ["Add","any","new","local","rules","(","renamed","rules","included",")","to","the","remote","database"]
code: def _add_new_rules(self, skip_staging=False):
      """Add any new local rules (renamed rules included) to the remote database"""
      # If the table is empty, no rules have been added yet
      # Add them all as unstaged to avoid demoting rules from production status
      # Also, allow the user to bypass staging with the skip_staging flag
      skip_staging = skip_staging or (len(self.remote_rule_names) == 0)
      with self._table.batch_writer() as batch:
          for rule_name in self.local_not_remote:
              LOGGER.debug(
                  "Adding rule '%s' (skip staging=%s)",
                  rule_name,
                  skip_staging,
              )
              batch.put_item(
                  self._dynamo_record(rule_name, skip_staging)
              )
  
imports: from datetime import datetime, timedelta
  import boto3
  from streamalert.shared.helpers.dynamodb import ignore_conditional_failure
  from streamalert.shared.importer import import_folders
  from streamalert.shared.logger import get_logger
  from streamalert.shared.rule import Rule
label_desc: Use image node_id 3 for calling the RuleTable obj's underlying member method code with example usage: obj._add_new_rules(skip_staging) without return types