ves-io-schema-views-rate_limiter_policy-API-Get

Examples of getting ratelimiterpolicy

Usecase:

Get rate-limiter-policy-1

Request using vesctl:

vesctl configuration get rate_limiter_policy rate-limiter-policy-1 --namespace documentation

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: rate-limiter-policy-1
  namespace: documentation
referringObjects: []
resourceVersion: "1068"
spec:
  rules:
  - metadata:
      description: description-1
      name: rule-1
    spec:
      bypassRateLimiter: {}
      headers: []
      path:
        exactValues:
        - /register
        - /guest-play
        prefixValues: []
        regexValues: []
        transformers: []
  - metadata:
      description: description-2
      name: rule-2
    spec:
      bypassRateLimiter: {}
      headers:
      - item:
          exactValues:
          - en-US
          regexValues: []
          transformers: []
        name: Accept-Language
      - item:
          exactValues:
          - gzip
          - deflate
          regexValues: []
          transformers: []
        name: Accept-Encoding
      path:
        exactValues:
        - /register-v2
        - /guest-play-v2
        prefixValues: []
        regexValues: []
        transformers: []
  serverSelector:
    expressions:
    - geoip.ves.io/region in (US-West), deployment in (testing)
status: []
systemMetadata:
  creationTimestamp: "2021-07-14T08:08:50.047695144Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 88f82fff-8150-4e27-8811-0c25476c7004

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build381173587_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/rate_limiter_policys/rate-limiter-policy-1?response_format=0'

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 14 Jul 2021 08:08:50 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "1068",
  "metadata": {
    "name": "rate-limiter-policy-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "88f82fff-8150-4e27-8811-0c25476c7004",
    "creation_timestamp": "2021-07-14T08:08:50.047695144Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "server_selector": {
      "expressions": [
        "geoip.ves.io/region in (US-West), deployment in (testing)"
      ]
    },
    "rules": [
      {
        "metadata": {
          "name": "rule-1",
          "description": "description-1",
          "disable": false
        },
        "spec": {
          "bypass_rate_limiter": {

          },
          "http_method": null,
          "domain_matcher": null,
          "path": {
            "prefix_values": [
            ],
            "exact_values": [
              "/register",
              "/guest-play"
            ],
            "regex_values": [
            ],
            "transformers": [
            ]
          },
          "headers": [
          ]
        }
      },
      {
        "metadata": {
          "name": "rule-2",
          "description": "description-2",
          "disable": false
        },
        "spec": {
          "bypass_rate_limiter": {

          },
          "http_method": null,
          "domain_matcher": null,
          "path": {
            "prefix_values": [
            ],
            "exact_values": [
              "/register-v2",
              "/guest-play-v2"
            ],
            "regex_values": [
            ],
            "transformers": [
            ]
          },
          "headers": [
            {
              "name": "Accept-Language",
              "item": {
                "exact_values": [
                  "en-US"
                ],
                "regex_values": [
                ],
                "transformers": [
                ]
              },
              "invert_matcher": false
            },
            {
              "name": "Accept-Encoding",
              "item": {
                "exact_values": [
                  "gzip",
                  "deflate"
                ],
                "regex_values": [
                ],
                "transformers": [
                ]
              },
              "invert_matcher": false
            }
          ]
        }
      }
    ]
  },
  "status": [
  ],
  "referring_objects": [
  ]
}