class_docstr: A class to load, modify, and display the StreamAlertCLI Config
docstr: Add a metric alarm that corresponds to a predefined metrics
  
  Args:
      alarm_info (dict): All the necessary values needed to add a CloudWatch
          metric alarm
docstr_tok: ["Add","a","metric","alarm","that","corresponds","to","a","predefined","metrics","Args",":","alarm_info","(","dict",")",":","All","the","necessary","values","needed","to","add","a","CloudWatch","metric","alarm"]
code: def add_metric_alarm(self, alarm_info):
      """Add a metric alarm that corresponds to a predefined metrics
  
      Args:
          alarm_info (dict): All the necessary values needed to add a CloudWatch
              metric alarm
      """
      # Check to see if an alarm with this name already exists
      if self._alarm_exists(alarm_info["alarm_name"]):
          return False
  
      # Get the current metrics for each function
      current_metrics = metrics.MetricLogger.get_available_metrics()[
          alarm_info["function"]
      ]
  
      if not alarm_info["metric_name"] in current_metrics:
          LOGGER.error(
              "Metric name '%s' not defined for function '%s'",
              alarm_info["metric_name"],
              alarm_info["function"],
          )
          return False
  
      if "clusters" in alarm_info:
          self._add_cluster_metric_alarm(alarm_info)
      else:
          if not self._add_global_metric_alarm(alarm_info):
              return False
  
      self.write()
  
      return True
  
imports: import json
  import os
  import re
  import shutil
  import string
  import tempfile
  from streamalert.apps import StreamAlertApp
  from streamalert.shared import CLUSTERED_FUNCTIONS, config, metrics
  from streamalert.shared.logger import get_logger
  from streamalert_cli.terraform import TERRAFORM_FILES_PATH
  from streamalert_cli.apps.helpers import save_app_auth_info
  from streamalert_cli.helpers import continue_prompt
label_desc: Use image node_id 20 for calling the CLIConfig obj's underlying member method code with example usage: obj.add_metric_alarm(alarm_info) and returns: True, False, False, False