code: def waf_rule_id(self, lookup, default=None):
      
      # list_rules returns at most 100 rules per request
      list_limit = 100
      rules = EFAwsResolver.__CLIENTS["waf"].list_rules(Limit=list_limit)
      while True:
        for rule in rules["Rules"]:
          if rule["Name"] == lookup:
            return rule["RuleId"]
        if rules.has_key("NextMarker"):
          rules = EFAwsResolver.__CLIENTS["waf"].list_rules(Limit=list_limit, NextMarker=rules["NextMarker"])
        else:
          return default
docs: Args:
        lookup: the friendly name of a WAF rule
        default: the optional value to return if lookup failed; returns None if not set
      Returns:
        the ID of the WAF rule whose name matches 'lookup' or default/None if no match found