def post(self, profile_name): rule_set_list = request.json['rule_set_list'] replace = request.json.get('replace', False) if replace: # delete existing rules on the profile base_query.delete_item(models.WafProfileRuleSet, profile_name=profile_name) for rule_set_name in rule_set_list: data = {'profile_name': profile_name, 'rule_set_name': rule_set_name} base_query.create_item(models.WafProfileRuleSet, **data) # update waf-profile with the number of rules base_query.update_item(models.WafProfile, {'name': profile_name}, rule_count=len(rule_set_list)) return None
def delete(self, name): base_query.delete_item(models.WafProfile, name=name) # delete all the profile rulesets for this profile base_query.delete_item(models.WafProfileRuleSet, profile_name=name) return
def delete(self, policy_profile_name, rule_id): return base_query.delete_item(models.PolicyProfileRule, profile_name=policy_profile_name, id=rule_id)
def delete(self, name): return base_query.delete_item(models.PolicyProfile, name=name)
def delete(self, name): base_query.delete_item(models.KubeProfile, name=name)
def delete(self, name): base_query.delete_item(models.Address, name=name)
def delete(self, name): base_query.delete_item(models.Certificate, name=name)