ves-io-schema-app_firewall-API-Create

Examples of creating app_firewall

Usecase:

Create app-firewall-1

Request using vesctl:

vesctl configuration create app_firewall -i app_firewall.yaml

where file appfirewall.yaml has following contents (appfirewall.CreateRequest):

metadata:
  name: app-firewall-1
  namespace: documentation
spec:
  allowAllResponseCodes: null
  blocking: null
  defaultAnonymization: null
  defaultBotSetting: null
  defaultDetectionSettings: null
  useDefaultBlockingPage: null

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: app-firewall-1
  namespace: documentation
spec: {}
systemMetadata:
  creationTimestamp: "2022-01-12T14:47:44.866689Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 0a95f164-1f27-4487-843c-c9eea1b17c72

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"app-firewall-1","namespace":"documentation"},"spec":{"blocking":null,"defaultDetectionSettings":null,"defaultBotSetting":null,"allowAllResponseCodes":null,"defaultAnonymization":null,"useDefaultBlockingPage":null}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build038462651_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/app_firewalls'

curl response:

HTTP/1.1 200 OK
Content-Length: 596
Content-Type: application/json
Date: Wed, 12 Jan 2022 14:47:44 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "app-firewall-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "0a95f164-1f27-4487-843c-c9eea1b17c72",
    "creation_timestamp": "2022-01-12T14:47:44.866689Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {

  }
}