ves-io-schema-fast_acl_rule-API-Replace

Examples of replacing fastaclrule

Usecase:

Replace fast-acl-rule-white-list with action now changed to ratelimit traffic

Request using vesctl:

vesctl configuration replace fast_acl_rule -i fast_acl_rule.yaml

where file fastaclrule.yaml has following contents (fastaclrule.ReplaceRequest):

metadata:
  name: fast-acl-rule-white-list
  namespace: system
spec:
  action:
    policerAction:
      ref:
      - kind: policer
        name: policer-10kbps
  ipPrefixSet:
    ref:
    - kind: ip_prefix_set
      name: acmecorp-white-list
      namespace: system
      tenant: acmecorp

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"fast-acl-rule-white-list","namespace":"system"},"spec":{"action":{"policerAction":{"ref":[{"kind":"policer","name":"policer-10kbps"}]}},"ipPrefixSet":{"ref":[{"kind":"ip_prefix_set","tenant":"acmecorp","namespace":"system","name":"acmecorp-white-list"}]}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/fast_acl_rules/fast-acl-rule-white-list'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:03 GMT
Vary: Accept-Encoding

{

}