ves-io-schema-waf_rule_list-API-Create

Examples of creating wafrulelist

Usecase:

Create a new wafrulelist.

Request using vesctl:

vesctl configuration create waf_rule_list -i waf_rule_list.yaml

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

metadata:
  name: object-1
  namespace: documentation
spec: {}

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: object-1
  namespace: documentation
spec:
  ruleIds: []
systemMetadata:
  creationTimestamp: "2021-08-25T09:04:46.490919099Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 1a04f253-1ae9-469c-a8e7-def70287a555

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"object-1","namespace":"documentation"},"spec":{}}' -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/waf_rule_lists'

curl response:

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

{
  "metadata": {
    "name": "object-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "1a04f253-1ae9-469c-a8e7-def70287a555",
    "creation_timestamp": "2021-08-25T09:04:46.490919099Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "rule_ids": [
    ]
  }
}