code: def generate_apsara_log_config(json_value):
          
          input_detail = json_value['inputDetail']
          output_detail = json_value['outputDetail']
          config_name = json_value['configName']
          logSample = json_value.get('logSample', '')
  
          logstore_name = output_detail['logstoreName']
          endpoint = output_detail.get('endpoint', '')
          log_path = input_detail['logPath']
          file_pattern = input_detail['filePattern']
  
          log_begin_regex = input_detail.get('logBeginRegex', '')
          topic_format = input_detail['topicFormat']
          filter_keys = input_detail['filterKey']
          filter_keys_reg = input_detail['filterRegex']
  
          config = ApsaraLogConfigDetail(config_name, logstore_name, endpoint, log_path, file_pattern,
                                         log_begin_regex, topic_format, filter_keys, filter_keys_reg, logSample)
          return config
docs: Generate apsara logtail config from loaded json value
  
          :param json_value:
          :return: