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: "1237"
spec:
  anomalyScoreThreshold: 5
  paranoiaLevel: 1
  ruleIds: []
status: []
systemMetadata:
  creationTimestamp: "2021-07-14T08:09:10.584065534Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 52252449-dcd3-451a-86ad-e6ded21efcbc

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build381173587_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, 14 Jul 2021 08:09:10 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "1237",
  "metadata": {
    "name": "waf-rules-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "52252449-dcd3-451a-86ad-e6ded21efcbc",
    "creation_timestamp": "2021-07-14T08:09:10.584065534Z",
    "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": [
  ]
}