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:
  blocking: null
  defaultBotSetting: null
  defaultDetectionSettings: null

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: app-firewall-1
  namespace: documentation
spec: {}
systemMetadata:
  creationTimestamp: "2021-08-25T09:02:36.051427186Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 52e6988e-809c-413b-94bb-ec9dc1fe2820

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"app-firewall-1","namespace":"documentation"},"spec":{"blocking":null,"defaultDetectionSettings":null,"defaultBotSetting":null}}' -H 'Content-Type: application/json' -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/app_firewalls'

curl response:

HTTP/1.1 200 OK
Content-Length: 599
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:02:36 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "app-firewall-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "52e6988e-809c-413b-94bb-ec9dc1fe2820",
    "creation_timestamp": "2021-08-25T09:02:36.051427186Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {

  }
}