ves-io-schema-waf-API-Replace

Examples of replacing waf

Usecase:

Replace waf-1

Request using vesctl:

vesctl configuration replace waf -i waf.yaml

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

metadata:
  name: waf-1
  namespace: documentation
spec:
  appProfile:
    cms:
    - DOKUWIKI
    - CPANEL
    language:
    - JAVA
    webserver:
    - IIS
  disabledDetectionTags:
    detectionTagType:
    - DATA_LEAKAGE
  mode: ALERT_ONLY

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"waf-1","namespace":"documentation"},"spec":{"appProfile":{"language":["JAVA"],"cms":["DOKUWIKI","CPANEL"],"webserver":["IIS"]},"mode":"ALERT_ONLY","disabledDetectionTags":{"detectionTagType":["DATA_LEAKAGE"]}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build823219857_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/wafs/waf-1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 23 Sep 2020 09:54:26 GMT
Vary: Accept-Encoding

{

}