ves-io-schema-rate_limiter-API-Create

Examples of creating rate_limiter

Usecase:

Create a new rate_limiter.

Request using vesctl:

vesctl configuration create rate_limiter -i rate_limiter.yaml

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

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

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: object-1
  namespace: documentation
spec:
  limits: []
  userIdentification: []
systemMetadata:
  creationTimestamp: "2021-08-25T09:03:45.065157820Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: dc5fdb1b-3565-4bb1-981c-467668a6ac98

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/rate_limiters'

curl response:

HTTP/1.1 200 OK
Content-Length: 650
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:03:45 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "object-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "dc5fdb1b-3565-4bb1-981c-467668a6ac98",
    "creation_timestamp": "2021-08-25T09:03:45.065157820Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "limits": [
    ],
    "user_identification": [
    ]
  }
}