ves-io-schema-service_policy-API-Get

Examples of getting service_policy

Usecase:

Get service-policy-1

Request using vesctl:

vesctl configuration get service_policy service-policy-1 --namespace documentation

vesctl yaml response:

object:
  metadata:
    annotations: {}
    labels: {}
    name: service-policy-1
    namespace: documentation
    uid: fea4f9c7-3ba3-46a0-98ae-204d58f536fb
  spec:
    gcSpec:
      rules: []
      simpleRules: []
  systemMetadata:
    creationTimestamp: "2020-07-02T15:53:30.028634400Z"
    creatorClass: examplesvc.ves.io
    finalizers: []
    namespace:
    - kind: namespace
      name: documentation
      tenant: acmecorp
    tenant: acmecorp
    traceInfo: 12259f04ba2262bd:12259f04ba2262bd:0:1
    uid: fea4f9c7-3ba3-46a0-98ae-204d58f536fb
resourceVersion: "535"
status: []

Request using curl:

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

curl response:

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

{
  "object": {
    "metadata": {
      "name": "service-policy-1",
      "namespace": "documentation",
      "uid": "fea4f9c7-3ba3-46a0-98ae-204d58f536fb",
      "labels": {
      },
      "annotations": {
      },
      "description": "",
      "disable": false
    },
    "system_metadata": {
      "uid": "fea4f9c7-3ba3-46a0-98ae-204d58f536fb",
      "creation_timestamp": "2020-07-02T15:53:30.028634400Z",
      "deletion_timestamp": null,
      "modification_timestamp": null,
      "initializers": null,
      "finalizers": [
      ],
      "tenant": "acmecorp",
      "creator_class": "examplesvc.ves.io",
      "creator_id": "",
      "creator_cookie": "",
      "trace_info": "12259f04ba2262bd:12259f04ba2262bd:0:1",
      "object_index": 0,
      "namespace": [
        {
          "kind": "namespace",
          "uid": "",
          "tenant": "acmecorp",
          "namespace": "",
          "name": "documentation"
        }
      ],
      "owner_view": null
    },
    "spec": {
      "gc_spec": {
        "algo": "FIRST_MATCH",
        "server_name": "",
        "server_selector": null,
        "server_name_matcher": null,
        "port_matcher": null,
        "role": null,
        "deny_info": null,
        "rules": [
        ],
        "simple_rules": [
        ]
      }
    }
  },
  "create_form": null,
  "replace_form": null,
  "resource_version": "535",
  "metadata": null,
  "system_metadata": null,
  "spec": null,
  "status": [
  ]
}