ves-io-schema-views-policy_based_routing-API-Get

Examples of getting policybasedrouting

Usecase:

Get policy-based-routing-1

Request using vesctl:

vesctl configuration get policy_based_routing policy-based-routing-1 --namespace documentation

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: policy-based-routing-1
  namespace: documentation
referringObjects: []
resourceVersion: "1040"
spec:
  forwardingClassList:
  - name: forward-class-1
    namespace: documentation
    tenant: acmecorp
  networkPbr:
    any: {}
    networkPbrRules:
    - allTraffic: {}
      dnsName: www.abc.com
      forwardingClassList:
      - name: forward-class-2
        namespace: documentation
        tenant: acmecorp
      metadata:
        name: rule-1
status: []
systemMetadata:
  creationTimestamp: "2021-06-02T10:22:43.404776833Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 64c6d259-92dc-4ec9-b43a-fc13ce146b8a

Request using curl:

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

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 02 Jun 2021 10:22:43 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "1040",
  "metadata": {
    "name": "policy-based-routing-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "64c6d259-92dc-4ec9-b43a-fc13ce146b8a",
    "creation_timestamp": "2021-06-02T10:22:43.404776833Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "network_pbr": {
      "any": {

      },
      "network_pbr_rules": [
        {
          "metadata": {
            "name": "rule-1",
            "description": "",
            "disable": false
          },
          "rule_name": "",
          "forwarding_class_list": [
            {
              "tenant": "acmecorp",
              "namespace": "documentation",
              "name": "forward-class-2"
            }
          ],
          "dns_name": "www.abc.com",
          "all_traffic": {

          }
        }
      ]
    },
    "forwarding_class_list": [
      {
        "tenant": "acmecorp",
        "namespace": "documentation",
        "name": "forward-class-1"
      }
    ]
  },
  "status": [
  ],
  "referring_objects": [
  ]
}