ves-io-schema-waf_rules-API-Get

Examples of getting waf_rules

Usecase:

Get waf-rules-1

Request using vesctl:

vesctl configuration get waf_rules waf-rules-1 --namespace documentation

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: waf-rules-1
  namespace: documentation
referringObjects: []
resourceVersion: "1266"
spec:
  anomalyScoreThreshold: 5
  paranoiaLevel: 1
  ruleIds: []
status: []
systemMetadata:
  creationTimestamp: "2021-08-25T09:04:47.885014418Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: cfd02ebf-1450-47aa-9c2a-dc603ee40ecc

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build970361017_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/waf_ruless/waf-rules-1?response_format=0'

curl response:

HTTP/1.1 200 OK
Content-Length: 876
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:04:47 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "1266",
  "metadata": {
    "name": "waf-rules-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "cfd02ebf-1450-47aa-9c2a-dc603ee40ecc",
    "creation_timestamp": "2021-08-25T09:04:47.885014418Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "mode": "BLOCK",
    "anomaly_score_threshold": 5,
    "paranoia_level": 1,
    "rule_ids": [
    ],
    "rule_list_type": "EXCLUDE"
  },
  "status": [
  ],
  "referring_objects": [
  ]
}