def set_app_param_config(params): """ :param var_name: :param var_value: :return: """ region_name = get_region() ssm_parameter_path = short_config_path + '/' + BaseUtil.get_func() app_config = get_app_config() try: param = app_config.get_param(settings.FUNC_NAME) for var_name in params.keys(): param[var_name] = params[var_name] value = '{' for i in param: value = value + '"' + str(i) + '":"' + str(param[i]) + '",' value = value[:-1] value = value + '}' return set_config(region_name, ssm_parameter_path, value) except CacheKeyException as e: value = '{' for var_name in params.keys(): value = value + '"' + str(var_name) + '":"' + str(params[var_name]) + '",' value = value[:-1] value = value + '}' return set_config(region_name, ssm_parameter_path, value)
def set_app_param_config(params): """ :param region_name: :param host: :return: """ full_config_path, short_config_path = BaseUtil.get_env() ssm_parameter_path = short_config_path + '/' + BaseUtil.get_func() value = '{' for var_name in params.keys(): value = value + '"' + str(var_name) + '":"' + str( params[var_name]) + '",' value = value[:-1] value = value + '}' return set_config(ssm_parameter_path, value)