ves-io-schema-waf_rules-API-Replace

Examples of replacing waf_rules

Usecase:

Replace waf-rules-1

Request using vesctl:

vesctl configuration replace waf_rules -i waf_rules.yaml

where file wafrules.yaml has following contents (wafrules.ReplaceRequest):

metadata:
  name: waf-rules-1
  namespace: documentation
spec:
  anomalyScoreThreshold: 10
  mode: ALERT_ONLY
  paranoiaLevel: 4
  ruleIds:
  - WAF_RULE_941100

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"waf-rules-1","namespace":"documentation"},"spec":{"mode":"ALERT_ONLY","anomalyScoreThreshold":10,"paranoiaLevel":4,"ruleIds":["WAF_RULE_941100"]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build013258245_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/waf_ruless/waf-rules-1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 16 Sep 2020 10:51:13 GMT
Vary: Accept-Encoding

{

}